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

C / C++ / MFC

 
AnswerRe: Is this code ok? Pin
Maximilien11-Oct-05 13:07
Maximilien11-Oct-05 13:07 
AnswerRe: Is this code ok? Pin
oustar11-Oct-05 15:40
oustar11-Oct-05 15:40 
GeneralRe: Is this code ok? Pin
Maximilien11-Oct-05 16:01
Maximilien11-Oct-05 16:01 
AnswerRe: Is this code ok? Pin
Prakash Nadar11-Oct-05 17:15
Prakash Nadar11-Oct-05 17:15 
AnswerRe: Is this code ok? Pin
Bob Stanneveld11-Oct-05 23:02
Bob Stanneveld11-Oct-05 23:02 
GeneralRe: Is this code ok? Pin
Maximilien12-Oct-05 0:47
Maximilien12-Oct-05 0:47 
GeneralRe: Is this code ok? Pin
Bob Stanneveld12-Oct-05 5:56
Bob Stanneveld12-Oct-05 5:56 
AnswerRe: Is this code ok? Pin
Mateusz Karbowy12-Oct-05 11:22
Mateusz Karbowy12-Oct-05 11:22 
Well, actually I wrote this code and it works. The only thing I want is to get a return value of function MyMethod() and if I use for example:

int i = 5;<br />
int MyValue = MyClass().MyMethod(i);


the MyValue variable actually has got the value returned by function MyMethod(). So, I don't actually care in this case if that temporary object is destroyed as long as I can get the return value of it's function MyMethod().


By the way, I use Visual Studio .NET 2003 and I've noticed something strange about this:

class MyClass<br />
{<br />
public:<br />
MyClass(); // constructor<br />
MyClass(CString MyString); // constructor with parameter<br />
int MyMethod(int MyVariable);<br />
};


I use this temporary object by calling a constructor with parameter, like:

CString MyString;<br />
MyString = "Example string";<br />
<br />
MyClass(MyString).
<- at this moment I do nothing, and the list of variables and methods appears

But if I use a default constructor (with no parameters), like:

MyClass(). <- there's no list, although it should appear

I've noticed that the list of variables and methods appears when the code is ok, but if I have mistakes in the code, it doesn't appear. So if the list doesn't appear after calling a constructor without parameter, and if it appears after calling a constructor WITH parameter - something is not quite ok...

Thanks for replies.
QuestionReplacing http headers with LSP Pin
Tomek.Sergey11-Oct-05 12:37
Tomek.Sergey11-Oct-05 12:37 
QuestionContolling the Font with CDC text methods? Pin
Ian Bowler11-Oct-05 12:02
Ian Bowler11-Oct-05 12:02 
AnswerRe: Contolling the Font with CDC text methods? Pin
Chris Losinger11-Oct-05 14:00
professionalChris Losinger11-Oct-05 14:00 
GeneralRe: Contolling the Font with CDC text methods? Pin
Ian Bowler11-Oct-05 14:01
Ian Bowler11-Oct-05 14:01 
AnswerRe: Contolling the Font with CDC text methods? Pin
Roger Allen12-Oct-05 13:42
Roger Allen12-Oct-05 13:42 
QuestionCFtpConnection::GetFile - error 12003 ? Pin
chenggong11-Oct-05 8:12
chenggong11-Oct-05 8:12 
AnswerRe: CFtpConnection::GetFile - error 12003 ? Pin
RadioOpa11-Oct-05 8:31
RadioOpa11-Oct-05 8:31 
QuestionMFC multiple groups of radio buttons Pin
Axonn Echysttas11-Oct-05 7:37
Axonn Echysttas11-Oct-05 7:37 
AnswerRe: MFC multiple groups of radio buttons Pin
David Crow11-Oct-05 9:02
David Crow11-Oct-05 9:02 
GeneralRe: MFC multiple groups of radio buttons Pin
Axonn Echysttas11-Oct-05 20:00
Axonn Echysttas11-Oct-05 20:00 
QuestionReally Urgent (Function to get the size of a file) Pin
REU11-Oct-05 7:08
REU11-Oct-05 7:08 
AnswerRe: Really Urgent (Function to get the size of a file) Pin
Chris Losinger11-Oct-05 7:18
professionalChris Losinger11-Oct-05 7:18 
GeneralRe: Really Urgent (Function to get the size of a file) Pin
REU11-Oct-05 7:28
REU11-Oct-05 7:28 
GeneralRe: Really Urgent (Function to get the size of a file) Pin
REU11-Oct-05 7:42
REU11-Oct-05 7:42 
Questionconstructor : 2 step constructor ... Pin
Maximilien11-Oct-05 6:47
Maximilien11-Oct-05 6:47 
AnswerRe: constructor : 2 step constructor ... Pin
Prakash Nadar11-Oct-05 7:13
Prakash Nadar11-Oct-05 7:13 
QuestionGreat News! Pin
Al Baraki11-Oct-05 6:01
Al Baraki11-Oct-05 6:01 

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.