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

C / C++ / MFC

 
QuestionRe: Local symbols of a shared library Pin
CPallini25-May-09 20:41
mveCPallini25-May-09 20:41 
QuestionPlease help with MFC dialog Pin
Ryuk199025-May-09 12:50
Ryuk199025-May-09 12:50 
AnswerRe: Please help with MFC dialog Pin
Stuart Dootson25-May-09 14:04
professionalStuart Dootson25-May-09 14:04 
GeneralRe: Please help with MFC dialog Pin
Ryuk199025-May-09 14:29
Ryuk199025-May-09 14:29 
GeneralRe: Please help with MFC dialog Pin
Stuart Dootson25-May-09 14:33
professionalStuart Dootson25-May-09 14:33 
AnswerRe: Please help with MFC dialog Pin
Bram van Kampen26-May-09 13:59
Bram van Kampen26-May-09 13:59 
QuestionMacros. Pin
bawratri25-May-09 12:15
bawratri25-May-09 12:15 
AnswerRe: Macros. Pin
Stuart Dootson25-May-09 13:27
professionalStuart Dootson25-May-09 13:27 
As you've found, you can't use __FUNCTION__, as it's inserted as a string, not a token. This is a shame, because you can convert a token to a string in the pre-processor, but not vice-versa.

So, you're only option would be this:

void a_main() { ; }

#define b(fn) a##fn()

int main()
{
  b(main);
  return 0;
}


i.e. putting the function name in explicitly Frown | :-(

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Macros. Pin
bawratri25-May-09 22:38
bawratri25-May-09 22:38 
QuestionMFC Networking Application. Pin
reddy0725-May-09 11:46
reddy0725-May-09 11:46 
AnswerRe: MFC Networking Application. Pin
norish26-May-09 17:50
norish26-May-09 17:50 
AnswerRe: MFC Networking Application. Pin
fanronghua26-May-09 22:32
fanronghua26-May-09 22:32 
Questionhow to connect database Pin
Supriyanka25-May-09 6:01
Supriyanka25-May-09 6:01 
QuestionRe: how to connect database Pin
David Crow25-May-09 8:33
David Crow25-May-09 8:33 
QuestionRe: how to connect database Pin
Supriyanka25-May-09 19:52
Supriyanka25-May-09 19:52 
QuestionRe: how to connect database Pin
David Crow26-May-09 3:06
David Crow26-May-09 3:06 
AnswerRe: how to connect database Pin
Hamid_RT25-May-09 19:22
Hamid_RT25-May-09 19:22 
GeneralRe: how to connect database Pin
fanronghua26-May-09 22:34
fanronghua26-May-09 22:34 
GeneralRe: how to connect database Pin
Hamid_RT27-May-09 1:22
Hamid_RT27-May-09 1:22 
QuestionMystry of C Pin
pandit8425-May-09 5:50
pandit8425-May-09 5:50 
AnswerRe: Mystry of C Pin
George L. Jackson25-May-09 6:57
George L. Jackson25-May-09 6:57 
AnswerRe: Mystry of C Pin
Stuart Dootson25-May-09 6:58
professionalStuart Dootson25-May-09 6:58 
GeneralRe: Mystry of C Pin
Maximilien25-May-09 8:17
Maximilien25-May-09 8:17 
GeneralRe: Mystry of C Pin
Mustafa Ismail Mustafa25-May-09 10:40
Mustafa Ismail Mustafa25-May-09 10:40 
GeneralRe: Mystry of C Pin
Stuart Dootson25-May-09 11:11
professionalStuart Dootson25-May-09 11: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.