Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: confuse CString::Replace() Pin
Max++4-Sep-06 3:56
Max++4-Sep-06 3:56 
GeneralRe: confuse CString::Replace() Pin
Hamid_RT4-Sep-06 22:30
Hamid_RT4-Sep-06 22:30 
QuestionCaption Bar with a Close Button in Dynamic Splitter Window Pin
rkshdixit4-Sep-06 2:14
rkshdixit4-Sep-06 2:14 
AnswerRe: Caption Bar with a Close Button in Dynamic Splitter Window Pin
gregdolley4-Sep-06 22:40
gregdolley4-Sep-06 22:40 
Questionput the tool tips to emptions in chat window Pin
johnalek4-Sep-06 2:10
johnalek4-Sep-06 2:10 
QuestionHow to use use Inline function? Pin
Andy Rama4-Sep-06 1:41
Andy Rama4-Sep-06 1:41 
AnswerRe: How to use use Inline function? Pin
Waldermort4-Sep-06 1:51
Waldermort4-Sep-06 1:51 
AnswerRe: How to use use Inline function? [modified] Pin
Emilio Garavaglia4-Sep-06 2:11
Emilio Garavaglia4-Sep-06 2:11 
a macro is a text replacer.
given
void Calling_Fun()
{
    MACRO_FUN(true);
    printf("1");
}

the preproccessor gives to the compiler the following:
void Calling_Fun()
{
    { if(true) return; printf("2");}
    printf("1");
}

A inline function is -instead- an ordinary function that is compiled in the including unit. No preprocessing is involved, so the return in your inline_Fun returns from the function.

There is no way to do what you ask in the way you expect because the language semantics is not as you intend.

a workaround can be the use of exceptions, but if you are in trouble in distinguishing a macro semantics from a function semantics, that's not the way to go.



____

posting suggestion:
use <pre> you code </pre> to preserve code formatting.





-- modified at 8:20 Monday 4th September, 2006


2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:

QuestionGetting Current Desktop Name Pin
MohammadAmiry4-Sep-06 1:32
MohammadAmiry4-Sep-06 1:32 
AnswerRe: Getting Current Desktop Name Pin
gregdolley4-Sep-06 22:47
gregdolley4-Sep-06 22:47 
Questionusing PDH library to find memory leaks Pin
m.dietz4-Sep-06 1:12
m.dietz4-Sep-06 1:12 
QuestionWhiteboard feature? Pin
_AnsHUMAN_ 4-Sep-06 1:10
_AnsHUMAN_ 4-Sep-06 1:10 
AnswerRe: Whiteboard feature? Pin
Waldermort4-Sep-06 1:37
Waldermort4-Sep-06 1:37 
Questiondetect down mouse left button Pin
majco3334-Sep-06 0:34
majco3334-Sep-06 0:34 
AnswerRe: detect down mouse left button Pin
toxcct4-Sep-06 0:38
toxcct4-Sep-06 0:38 
GeneralRe: detect down mouse left button Pin
benjymous4-Sep-06 0:55
benjymous4-Sep-06 0:55 
GeneralRe: detect down mouse left button Pin
majco3334-Sep-06 1:08
majco3334-Sep-06 1:08 
GeneralRe: detect down mouse left button Pin
benjymous4-Sep-06 1:16
benjymous4-Sep-06 1:16 
GeneralRe: detect down mouse left button Pin
majco3334-Sep-06 1:33
majco3334-Sep-06 1:33 
GeneralRe: detect down mouse left button Pin
Stephen Hewitt4-Sep-06 2:03
Stephen Hewitt4-Sep-06 2:03 
GeneralRe: detect down mouse left button Pin
toxcct4-Sep-06 2:30
toxcct4-Sep-06 2:30 
AnswerRe: detect down mouse left button Pin
Hamid_RT4-Sep-06 1:07
Hamid_RT4-Sep-06 1:07 
AnswerRe: detect down mouse left button Pin
Stephen Hewitt4-Sep-06 2:01
Stephen Hewitt4-Sep-06 2:01 
GeneralRe: detect down mouse left button Pin
majco3334-Sep-06 2:14
majco3334-Sep-06 2:14 
QuestionMFC ToolsBar Handle Pin
ninolaroca4-Sep-06 0:12
ninolaroca4-Sep-06 0:12 

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.