Click here to Skip to main content
15,921,250 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Errors Using CMap Collections Pin
Zac Howland7-Sep-06 4:48
Zac Howland7-Sep-06 4:48 
GeneralRe: Errors Using CMap Collections Pin
nadiric7-Sep-06 5:23
nadiric7-Sep-06 5:23 
QuestionHelp for ETSLayoutDialog Manager! Pin
bosfan6-Sep-06 3:27
bosfan6-Sep-06 3:27 
AnswerRe: Help for ETSLayoutDialog Manager! Pin
Cedric Moonen6-Sep-06 4:05
Cedric Moonen6-Sep-06 4:05 
GeneralRe: Help for ETSLayoutDialog Manager! Pin
bosfan6-Sep-06 4:30
bosfan6-Sep-06 4:30 
GeneralRe: Help for ETSLayoutDialog Manager! Pin
Cedric Moonen6-Sep-06 4:34
Cedric Moonen6-Sep-06 4:34 
GeneralRe: Help for ETSLayoutDialog Manager! Pin
bosfan6-Sep-06 5:09
bosfan6-Sep-06 5:09 
QuestionMCI CD Audio Output Pin
Cpt Rick6-Sep-06 2:56
Cpt Rick6-Sep-06 2:56 
AnswerRe: MCI CD Audio Output Pin
Christopher Duncan6-Sep-06 7:52
Christopher Duncan6-Sep-06 7:52 
Questionstoring data to a file Pin
vijay_aroli6-Sep-06 1:53
vijay_aroli6-Sep-06 1:53 
AnswerRe: storing data to a file Pin
led mike6-Sep-06 6:07
led mike6-Sep-06 6:07 
AnswerRe: storing data to a file Pin
Jun Du6-Sep-06 10:32
Jun Du6-Sep-06 10:32 
QuestionHow Can i Call a Function Providing its name as a string Pin
MIAN KAMRAN6-Sep-06 1:29
MIAN KAMRAN6-Sep-06 1:29 
QuestionRe: How Can i Call a Function Providing its name as a string Pin
Rajesh R Subramanian6-Sep-06 1:36
professionalRajesh R Subramanian6-Sep-06 1:36 
AnswerRe: How Can i Call a Function Providing its name as a string Pin
Cedric Moonen6-Sep-06 1:38
Cedric Moonen6-Sep-06 1:38 
AnswerRe: How Can i Call a Function Providing its name as a string Pin
Frank K6-Sep-06 2:44
Frank K6-Sep-06 2:44 
AnswerRe: How Can i Call a Function Providing its name as a string Pin
Chris Losinger6-Sep-06 2:54
professionalChris Losinger6-Sep-06 2:54 
AnswerRe: How Can i Call a Function Providing its name as a string Pin
Viorel.6-Sep-06 3:12
Viorel.6-Sep-06 3:12 
AnswerRe: How Can i Call a Function Providing its name as a string Pin
yjzh6-Sep-06 4:20
yjzh6-Sep-06 4:20 
AnswerRe: How Can i Call a Function Providing its name as a string Pin
Rilhas8-Sep-06 9:29
Rilhas8-Sep-06 9:29 
Complementing to the other answers already given, the quick answer would be no, at least not in the way BASIC (for example) lets you do it (something like execute("a=myfunc(10,20)").

The process of calling functions based on the contents of a string has to be manually coded in some way. The most "automatic" way is the already mentioned "GetProcAddress" (you can hide most of the steps required inside macros or in a general purpose function), but prototypes will be always a pain (unless if they are, trivially, the same).

Depending on the extent of work you are willing to do, you can go as far as building your own C/C++ interpreter. I did this once, for a home automation system, where I made a program to go through all of my header files, scan function names and prototypes, and write code to execute the correct function with the correct parameters based on the contents of a string (the command entered by the user). Is not very hard work if you control the classes and functions. If not then be prepared for trouble.

I hope this helps,
Rilhas
QuestionWinsock TCP Client disconnect Pin
Eytukan6-Sep-06 1:21
Eytukan6-Sep-06 1:21 
AnswerRe: Winsock TCP Client disconnect Pin
Frank K6-Sep-06 2:29
Frank K6-Sep-06 2:29 
GeneralRe: Winsock TCP Client disconnect Pin
Eytukan6-Sep-06 3:17
Eytukan6-Sep-06 3:17 
AnswerRe: Winsock TCP Client disconnect Pin
cmk6-Sep-06 20:35
cmk6-Sep-06 20:35 
GeneralRe: Winsock TCP Client disconnect Pin
Eytukan7-Sep-06 21:09
Eytukan7-Sep-06 21:09 

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.