Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPrint Preview in applications Pin
msr_codeproject27-Oct-10 0:01
msr_codeproject27-Oct-10 0:01 
AnswerRe: Print Preview in applications Pin
Richard MacCutchan27-Oct-10 2:40
mveRichard MacCutchan27-Oct-10 2:40 
QuestionHow to print only the current folder name in powershell Pin
melwyn26-Oct-10 23:43
melwyn26-Oct-10 23:43 
AnswerRe: How to print only the current folder name in powershell Pin
Sauro Viti27-Oct-10 0:16
professionalSauro Viti27-Oct-10 0:16 
QuestionHow to convert PDF to image file? example:jpg etc. Pin
illfar26-Oct-10 22:00
illfar26-Oct-10 22:00 
AnswerRe: How to convert PDF to image file? example:jpg etc. Pin
CPallini26-Oct-10 22:36
mveCPallini26-Oct-10 22:36 
QuestionCFileDialog Pin
MsmVc26-Oct-10 21:36
MsmVc26-Oct-10 21:36 
AnswerRe: CFileDialog Pin
CPallini26-Oct-10 21:55
mveCPallini26-Oct-10 21:55 
QuestionHow to reset the Combo Box to previous selection [modified] Pin
msr_codeproject26-Oct-10 19:36
msr_codeproject26-Oct-10 19:36 
AnswerRe: How to reset the Combo Box to previous selection Pin
CPallini26-Oct-10 21:50
mveCPallini26-Oct-10 21:50 
GeneralRe: How to reset the Combo Box to previous selection Pin
msr_codeproject26-Oct-10 22:09
msr_codeproject26-Oct-10 22:09 
GeneralRe: How to reset the Combo Box to previous selection Pin
CPallini26-Oct-10 22:18
mveCPallini26-Oct-10 22:18 
QuestionError Heap in allocate modeless . Pin
HTT9026-Oct-10 7:32
HTT9026-Oct-10 7:32 
QuestionRe: Error Heap in allocate modeless . Pin
David Crow26-Oct-10 7:51
David Crow26-Oct-10 7:51 
AnswerRe: Error Heap in allocate modeless . Pin
CPallini26-Oct-10 9:30
mveCPallini26-Oct-10 9:30 
GeneralRe: Error Heap in allocate modeless . Pin
HTT9026-Oct-10 16:21
HTT9026-Oct-10 16:21 
GeneralRe: Error Heap in allocate modeless . Pin
CPallini26-Oct-10 21:21
mveCPallini26-Oct-10 21:21 
GeneralRe: Error Heap in allocate modeless . Pin
HTT9026-Oct-10 22:03
HTT9026-Oct-10 22:03 
GeneralRe: Error Heap in allocate modeless . Pin
CPallini26-Oct-10 22:17
mveCPallini26-Oct-10 22:17 
You should never define variables inside header files (headers are for declarations), because you may get multiple definitions of the same symbol (if, as usual, the header is included by many sources).
If you need to access a variable from multiple sources then you have to:
  • Declare it as extern inside an header file.
  • Define it inside just one source file.
  • Include the header file into every source that needs to access the variable itself.

Smile | :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Error Heap in allocate modeless . Pin
HTT9026-Oct-10 22:42
HTT9026-Oct-10 22:42 
Questionchar *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 7:12
ALLERSLIT26-Oct-10 7:12 
QuestionRe: char *> string conversion , env[] Pin
David Crow26-Oct-10 7:22
David Crow26-Oct-10 7:22 
AnswerRe: char *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 7:38
ALLERSLIT26-Oct-10 7:38 
AnswerRe: char *> string conversion , env[] Pin
David Crow26-Oct-10 7:46
David Crow26-Oct-10 7:46 
GeneralRe: char *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 7:50
ALLERSLIT26-Oct-10 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.