Click here to Skip to main content
15,919,479 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: virtual member? Pin
Matthew Faithfull20-Dec-07 3:12
Matthew Faithfull20-Dec-07 3:12 
GeneralConvert string to long Pin
SWDevil20-Dec-07 2:41
SWDevil20-Dec-07 2:41 
GeneralRe: Convert string to long Pin
CPallini20-Dec-07 2:53
mveCPallini20-Dec-07 2:53 
GeneralRe: Convert string to long Pin
Matthew Faithfull20-Dec-07 3:03
Matthew Faithfull20-Dec-07 3:03 
QuestionDetection of databases Pin
tom groezer20-Dec-07 2:14
tom groezer20-Dec-07 2:14 
GeneralRe: Detection of databases Pin
David Crow20-Dec-07 2:28
David Crow20-Dec-07 2:28 
Questionhow to format a pen drive? Pin
Shayantani20-Dec-07 1:27
Shayantani20-Dec-07 1:27 
AnswerRe: how to format a pen drive? [modified] Pin
kakan20-Dec-07 2:08
professionalkakan20-Dec-07 2:08 
GeneralReally Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 1:13
AhmedOsamaMoh20-Dec-07 1:13 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
CPallini20-Dec-07 1:58
mveCPallini20-Dec-07 1:58 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 2:28
AhmedOsamaMoh20-Dec-07 2:28 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
David Crow20-Dec-07 2:35
David Crow20-Dec-07 2:35 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
CPallini20-Dec-07 2:38
mveCPallini20-Dec-07 2:38 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Matthew Faithfull20-Dec-07 2:46
Matthew Faithfull20-Dec-07 2:46 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Member 75496020-Dec-07 4:27
Member 75496020-Dec-07 4:27 
Caveat: This is dubious practice. The memory layout is not guaranteed and should not be relied upon. Pointer arithmatic is not good. It is mostly just an "irresistible" question.

Given the above: an old technique is to use two function pointers

void functionA()
{
	// whatever
}
void functionB()
{
	// whatever
}

void dontdothis()
{
	void * p1 = functionA;
	void * p2 = functionB;
	char * p3 = static_cast<char *>(p1);
	char * p4 = static_cast<char *>(p2);
	size_t sizeFn = p4 - p3;
}

There is little, if anything, that can be done with this.
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 5:44
AhmedOsamaMoh20-Dec-07 5:44 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
David Crow20-Dec-07 5:51
David Crow20-Dec-07 5:51 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Member 75496020-Dec-07 5:58
Member 75496020-Dec-07 5:58 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
David Crow20-Dec-07 6:12
David Crow20-Dec-07 6:12 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 6:12
AhmedOsamaMoh20-Dec-07 6:12 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Member 75496020-Dec-07 7:28
Member 75496020-Dec-07 7:28 
QuestionNow to find if string X is the name of a directory/folder rather than the name of a file? Pin
Anthony Appleyard20-Dec-07 0:48
Anthony Appleyard20-Dec-07 0:48 
AnswerRe: Now to find if string X is the name of a directory/folder rather than the name of a file? Pin
CPallini20-Dec-07 0:58
mveCPallini20-Dec-07 0:58 
GeneralRe: Now to find if string X is the name of a directory/folder rather than the name of a file? Pin
Anthony Appleyard20-Dec-07 1:14
Anthony Appleyard20-Dec-07 1:14 
GeneralRe: Now to find if string X is the name of a directory/folder rather than the name of a file? Pin
JudyL_MD20-Dec-07 1:45
JudyL_MD20-Dec-07 1:45 

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.