Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ program calling another program Pin
Joel Holdsworth15-Aug-05 1:51
Joel Holdsworth15-Aug-05 1:51 
GeneralRe: Visual C++ program calling another program Pin
Anonymous15-Aug-05 2:09
Anonymous15-Aug-05 2:09 
GeneralRe: Visual C++ program calling another program Pin
BlackDice15-Aug-05 3:14
BlackDice15-Aug-05 3:14 
GeneralRe: Visual C++ program calling another program Pin
David Crow15-Aug-05 3:21
David Crow15-Aug-05 3:21 
GeneralRe: Visual C++ program calling another program Pin
David Crow15-Aug-05 3:17
David Crow15-Aug-05 3:17 
GeneralConst reference Pin
LiYS15-Aug-05 0:34
LiYS15-Aug-05 0:34 
GeneralRe: Const reference Pin
mark novak15-Aug-05 0:49
mark novak15-Aug-05 0:49 
GeneralRe: Const reference Pin
LiYS15-Aug-05 4:03
LiYS15-Aug-05 4:03 
extern class A;
A fun1()
{   
return A(); 
}

void fun2(A& a)
{}

int main()
{	
fun2(fun1());
}

I think specify fun2(...) argument as a const reference make sense. Because when the call to fun2(...) is made the compiler has to generate a temporary object in order to hold the object returned by fun1(...), and this temporary object default to const!But somehow compiler doesn't complain!

Mark Petrik Sosa wrote:
A a;
return a;

is the same as

return A();


is "return A();" just a call to the constructor?





GeneralOpening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:06
ArthurDt15-Aug-05 0:06 
GeneralRe: Opening a file for read when it is already open by another application Pin
Steve S15-Aug-05 0:15
Steve S15-Aug-05 0:15 
GeneralRe: Opening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:36
ArthurDt15-Aug-05 0:36 
GeneralRe: Opening a file for read when it is already open by another application Pin
HumanOsc15-Aug-05 0:21
HumanOsc15-Aug-05 0:21 
GeneralRe: Opening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:37
ArthurDt15-Aug-05 0:37 
GeneralRe: Opening a file for read when it is already open by another application Pin
u6ik15-Aug-05 0:22
u6ik15-Aug-05 0:22 
GeneralRe: Opening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:39
ArthurDt15-Aug-05 0:39 
QuestionHow to get the Font width ??? Pin
HumanOsc15-Aug-05 0:04
HumanOsc15-Aug-05 0:04 
AnswerRe: How to get the Font width ??? Pin
alias001815-Aug-05 0:21
alias001815-Aug-05 0:21 
GeneralRe: How to get the Font width ??? Pin
Steve S15-Aug-05 0:22
Steve S15-Aug-05 0:22 
AnswerRe: How to get the Font width ??? Pin
Steve S15-Aug-05 0:21
Steve S15-Aug-05 0:21 
AnswerRe: How to get the Font width ??? Pin
mark novak15-Aug-05 0:30
mark novak15-Aug-05 0:30 
GeneralRe: How to get the Font width ??? Pin
HumanOsc15-Aug-05 0:31
HumanOsc15-Aug-05 0:31 
GeneralRe: How to get the Font width ??? Pin
HumanOsc15-Aug-05 0:41
HumanOsc15-Aug-05 0:41 
GeneralRe: How to get the Font width ??? Pin
mark novak15-Aug-05 1:07
mark novak15-Aug-05 1:07 
GeneralRe: How to get the Font width ??? Pin
HumanOsc16-Aug-05 1:38
HumanOsc16-Aug-05 1:38 
GeneralRe: How to get the Font width ??? Pin
mark novak16-Aug-05 2:45
mark novak16-Aug-05 2: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.