Click here to Skip to main content
16,004,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralShellExecute in VC++ Pin
PrashantJ4-May-04 4:07
PrashantJ4-May-04 4:07 
GeneralRe: ShellExecute in VC++ Pin
Jens Doose4-May-04 4:22
Jens Doose4-May-04 4:22 
GeneralRe: ShellExecute in VC++ Pin
PrashantJ4-May-04 21:00
PrashantJ4-May-04 21:00 
Generalabout inline. Pin
vividtang4-May-04 4:02
vividtang4-May-04 4:02 
GeneralRe: about inline. Pin
Joe Woodbury4-May-04 4:18
professionalJoe Woodbury4-May-04 4:18 
GeneralRe: about inline. Pin
vividtang4-May-04 15:17
vividtang4-May-04 15:17 
GeneralRe: about inline. Pin
Joe Woodbury4-May-04 19:32
professionalJoe Woodbury4-May-04 19:32 
GeneralRe: about inline. Pin
toxcct4-May-04 21:58
toxcct4-May-04 21:58 
hey,
don't confuse an inline woth a macro. An inline functions stays a function. when the docs say the compiler will extend the inline, first, it is not an obligation (it does it only if the function is not very complicated), second, it does NOT copy the content of the function at the calling, it makes an adaptation.
the function :
<font style="color:blue;">inline int</font> my_sum_func(<font style="color:blue;">int </font>iParam1, <font style="color:blue;">int</font> iParam2) {
    return (iParam1 + iParam2);    <font style="color:green;">// Note the return here !</font>
}
 
the calling :
<font style="color:blue;">void</font> main (<font style="color:blue;">void</font>) {
    <font style="color:blue;">int</font> iSumResult = my_sum_func(5, 3);
}
<font style="color:green;">// Note also that there is no return statement in the main function, and it goes same way</font>

the compiler will extend such code like this :
<font style="color:blue;">void</font> main (<font style="color:blue;">void</font>) {
    <font style="color:blue;">int</font> iSumResult = (5 + 3);
}

are you now convinced ?

!!! : Don't forget : the compiler extends inlines functions only if it can, that is not an obligation to it !



TOXCCT >>> GEII power


GeneralProblem with std::map insert Pin
ykutanoor4-May-04 4:01
ykutanoor4-May-04 4:01 
GeneralRe: Problem with std::map insert Pin
Jens Doose4-May-04 4:20
Jens Doose4-May-04 4:20 
GeneralRe: Problem with std::map insert Pin
Dean Goodman4-May-04 4:28
Dean Goodman4-May-04 4:28 
GeneralProblem with std::map Pin
ykutanoor4-May-04 4:01
ykutanoor4-May-04 4:01 
GeneralRe: Problem with std::map Pin
Paul Ranson4-May-04 10:03
Paul Ranson4-May-04 10:03 
GeneralProblem with std::map Pin
ykutanoor4-May-04 4:00
ykutanoor4-May-04 4:00 
GeneralWin binaries and UNIX Pin
jimNLX4-May-04 3:58
jimNLX4-May-04 3:58 
GeneralRe: Win binaries and UNIX Pin
Antony M Kancidrowski4-May-04 4:39
Antony M Kancidrowski4-May-04 4:39 
GeneralRe: Win binaries and UNIX Pin
Dean Goodman4-May-04 4:45
Dean Goodman4-May-04 4:45 
GeneralRe: Win binaries and UNIX Pin
Michael Dunn4-May-04 6:11
sitebuilderMichael Dunn4-May-04 6:11 
GeneralRe: Win binaries and UNIX Pin
David Chamberlain4-May-04 7:48
David Chamberlain4-May-04 7:48 
GeneralCreating a CToolbarCtrl Pin
Rafael Fernández López4-May-04 3:54
Rafael Fernández López4-May-04 3:54 
GeneralRe: Creating a CToolbarCtrl Pin
Michael Dunn4-May-04 4:42
sitebuilderMichael Dunn4-May-04 4:42 
Questionhow to create new file format Pin
Rajesh match4-May-04 3:54
Rajesh match4-May-04 3:54 
Generalipc programming Pin
Member 10128694-May-04 3:27
Member 10128694-May-04 3:27 
GeneralMAPI Pin
asv4-May-04 3:15
asv4-May-04 3:15 
GeneralRe: MAPI Pin
David Crow4-May-04 3:54
David Crow4-May-04 3:54 

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.