Click here to Skip to main content
15,922,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSDI with no doc-view, replace CChildView, there is an error Pin
followait25-Nov-07 21:54
followait25-Nov-07 21:54 
AnswerFound the answer Pin
followait26-Nov-07 1:43
followait26-Nov-07 1:43 
QuestionGetting the raw input data without having a window Pin
Mithilesh Katre25-Nov-07 21:42
Mithilesh Katre25-Nov-07 21:42 
Questionproblem in enumerating the registry values. Pin
yudhisthira25-Nov-07 19:19
yudhisthira25-Nov-07 19:19 
AnswerRe: problem in enumerating the registry values. Pin
Mark Salsbery25-Nov-07 19:31
Mark Salsbery25-Nov-07 19:31 
AnswerRe: problem in enumerating the registry values. Pin
Stephen Hewitt25-Nov-07 19:40
Stephen Hewitt25-Nov-07 19:40 
AnswerRe: problem in enumerating the registry values. Pin
ThatsAlok25-Nov-07 20:03
ThatsAlok25-Nov-07 20:03 
QuestionCompile error about MACRO Pin
George_George25-Nov-07 19:06
George_George25-Nov-07 19:06 
Hello everyone,


The compile error of the following code is,

foo.cpp(7) : error C2146: syntax error : missing ';' before identifier '_'
foo.cpp(7) : error C2065: '_' : undeclared identifier
foo.cpp(7) : error C2143: syntax error : missing ';' before 'string'

I do not know why there is errors. I think in MERGE macro, the value of parameter a is hello and the value of parameter b is world in my case, and I defined hello_world to "H E L L O", it should be fine...

Any ideas?

<br />
#define MERGE(a,b)  a ## _ ## b<br />
#define hello_world "H E L L O"<br />
<br />
int foo()<br />
{<br />
	char* p0;<br />
	p0 = MERGE("hello", "world");<br />
<br />
	return 0;<br />
}<br />



thanks in advance,
George
AnswerRe: Compile error about MACRO Pin
Stephen Hewitt25-Nov-07 19:13
Stephen Hewitt25-Nov-07 19:13 
GeneralRe: Compile error about MACRO Pin
George_George26-Nov-07 2:02
George_George26-Nov-07 2:02 
GeneralRe: Compile error about MACRO Pin
Stephen Hewitt26-Nov-07 12:48
Stephen Hewitt26-Nov-07 12:48 
GeneralRe: Compile error about MACRO Pin
George_George26-Nov-07 23:27
George_George26-Nov-07 23:27 
AnswerRe: Compile error about MACRO Pin
CPallini25-Nov-07 21:31
mveCPallini25-Nov-07 21:31 
GeneralRe: Compile error about MACRO Pin
George_George26-Nov-07 1:58
George_George26-Nov-07 1:58 
GeneralRe: Compile error about MACRO Pin
CPallini26-Nov-07 2:13
mveCPallini26-Nov-07 2:13 
GeneralRe: Compile error about MACRO Pin
George_George26-Nov-07 4:29
George_George26-Nov-07 4:29 
AnswerRe: Compile error about MACRO Pin
David Crow26-Nov-07 4:04
David Crow26-Nov-07 4:04 
GeneralRe: Compile error about MACRO Pin
George_George26-Nov-07 4:30
George_George26-Nov-07 4:30 
Questioncan not close file in a loop to access an array of files [modified] Pin
mrby12325-Nov-07 18:53
mrby12325-Nov-07 18:53 
AnswerRe: can not close file in a loop to access an array of files Pin
Stephen Hewitt25-Nov-07 19:04
Stephen Hewitt25-Nov-07 19:04 
QuestionRe: can not close file in a loop to access an array of files Pin
Mark Salsbery25-Nov-07 19:09
Mark Salsbery25-Nov-07 19:09 
QuestionGUID_DEVICE_BATTERY error Pin
joshiprashant25-Nov-07 18:50
joshiprashant25-Nov-07 18:50 
AnswerRe: GUID_DEVICE_BATTERY error Pin
Florin Crişan25-Nov-07 22:06
Florin Crişan25-Nov-07 22:06 
AnswerRe: GUID_DEVICE_BATTERY error Pin
JudyL_MD26-Nov-07 2:55
JudyL_MD26-Nov-07 2:55 
QuestionWhile loop only works the first time through?? Pin
Officially Drew™25-Nov-07 17:25
Officially Drew™25-Nov-07 17:25 

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.