Click here to Skip to main content
15,886,788 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: please read it is importent Pin
Christian Graus6-Mar-06 1:03
protectorChristian Graus6-Mar-06 1:03 
Questionproblem using NtQuerySystemInformation Pin
gamitech6-Mar-06 0:19
gamitech6-Mar-06 0:19 
QuestionDirectory Pin
sundar_mca6-Mar-06 0:17
sundar_mca6-Mar-06 0:17 
QuestionRe: Directory Pin
David Crow6-Mar-06 2:48
David Crow6-Mar-06 2:48 
QuestionProblem with SQLSetEnvAttr Pin
Amit j Patil5-Mar-06 23:49
Amit j Patil5-Mar-06 23:49 
QuestionDeclare in form1.h causes error Pin
jantimmerman5-Mar-06 23:43
jantimmerman5-Mar-06 23:43 
AnswerRe: Declare in form1.h causes error Pin
Sebastian Schneider5-Mar-06 23:46
Sebastian Schneider5-Mar-06 23:46 
AnswerRe: Declare in form1.h causes error Pin
Ryan Binns5-Mar-06 23:57
Ryan Binns5-Mar-06 23:57 
The problem is that memory for that variable is being allocated in every source file that includes that header file - the linker is unable to determine which one to keep and which ones to throw away. All it knows is that the two memory locations have the same name - it doesn't know that they are the same variable.

The solution is to mark the variable as extern in the header file, and declare it as normal in exactly one of the source files.

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralRe: Declare in form1.h causes error Pin
jantimmerman6-Mar-06 1:14
jantimmerman6-Mar-06 1:14 
GeneralRe: Declare in form1.h causes error Pin
Ryan Binns6-Mar-06 3:10
Ryan Binns6-Mar-06 3:10 
QuestionVS 2005 manifest file problem. Pin
yourbuddy775-Mar-06 23:39
yourbuddy775-Mar-06 23:39 
QuestionConversion from VS 6.0 to .Net Pin
Neelesh K J Jain5-Mar-06 23:28
Neelesh K J Jain5-Mar-06 23:28 
AnswerRe: Conversion from VS 6.0 to .Net Pin
Nibu babu thomas5-Mar-06 23:36
Nibu babu thomas5-Mar-06 23:36 
AnswerRe: Conversion from VS 6.0 to .Net Pin
Christian Graus6-Mar-06 1:04
protectorChristian Graus6-Mar-06 1:04 
QuestionPower of 2 Pin
RichardS5-Mar-06 23:23
RichardS5-Mar-06 23:23 
Answer[Removed] Pin
toxcct5-Mar-06 23:28
toxcct5-Mar-06 23:28 
GeneralRe: Power of 2 Pin
RichardS5-Mar-06 23:34
RichardS5-Mar-06 23:34 
GeneralRe: Power of 2 Pin
Cedric Moonen5-Mar-06 23:44
Cedric Moonen5-Mar-06 23:44 
GeneralRe: Power of 2 Pin
toxcct5-Mar-06 23:46
toxcct5-Mar-06 23:46 
GeneralRe: Power of 2 Pin
Stephen Hewitt5-Mar-06 23:45
Stephen Hewitt5-Mar-06 23:45 
GeneralRe: Power of 2 Pin
Stephen Hewitt6-Mar-06 2:04
Stephen Hewitt6-Mar-06 2:04 
GeneralRe: Power of 2 Pin
toxcct6-Mar-06 2:06
toxcct6-Mar-06 2:06 
AnswerRe: Power of 2 Pin
Russell'5-Mar-06 23:33
Russell'5-Mar-06 23:33 
GeneralRe: Power of 2 Pin
RichardS5-Mar-06 23:38
RichardS5-Mar-06 23:38 
GeneralRe: Power of 2 Pin
Russell'6-Mar-06 0:11
Russell'6-Mar-06 0:11 

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.