Click here to Skip to main content
15,900,589 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Return Value for Constructer ????? Pin
eraccn9-Jul-07 14:19
eraccn9-Jul-07 14:19 
GeneralRe: Return Value for Constructer ????? Pin
ForNow9-Jul-07 15:43
ForNow9-Jul-07 15:43 
GeneralRe: Return Value for Constructer ????? Pin
Stephen Hewitt9-Jul-07 18:06
Stephen Hewitt9-Jul-07 18:06 
AnswerRe: Return Value for Constructer ????? Pin
Bram van Kampen9-Jul-07 14:31
Bram van Kampen9-Jul-07 14:31 
GeneralRe: Return Value for Constructer ????? Pin
ForNow9-Jul-07 15:42
ForNow9-Jul-07 15:42 
AnswerRe: Return Value for Constructer ????? Pin
eraccn9-Jul-07 16:53
eraccn9-Jul-07 16:53 
GeneralRe: Return Value for Constructer ????? Pin
ForNow9-Jul-07 18:06
ForNow9-Jul-07 18:06 
AnswerRe: Return Value for Constructer ????? Pin
G Haranadh9-Jul-07 21:37
G Haranadh9-Jul-07 21:37 
Why dont you go for parameterized constructor instead..Smile | :)
Use call by ref concept. Is this useful. Just pass one more argument in constructor as out parameter. retrun thru out parameter.
class CMyCls
{
public:
     CMyCls(){}
      
     CMyCls(CString str,int &nRet/*<small>This is out parameter</small>*/)
     {
         if(some thing1)
           nRet = your value; 
         else if(some thing2)
           nRet = your value; 
         else if(some thing2)
           nRet = your value; 
         else
           nRet = your value; 
     }
};
void main()
{
       <big>int result = 0;</big>
       class CMyCls obj("hello",<big>result</big>);
       //use the <big>result</big> here.
}

I dont know what you expecting. But hope this is useful 2 u.


Nice talking to you. Blush | :O
If you judge people, you have no time to love them. -- Mother Teresa

GeneralRe: Return Value for Constructer ????? Pin
ForNow10-Jul-07 0:06
ForNow10-Jul-07 0:06 
Questionwindows messages for file system [win32 api] Pin
Jayapal Chandran9-Jul-07 12:06
Jayapal Chandran9-Jul-07 12:06 
AnswerRe: windows messages for file system [win32 api] Pin
eraccn9-Jul-07 14:25
eraccn9-Jul-07 14:25 
QuestionLinker Error 2001 Pin
moonraker9289-Jul-07 11:23
moonraker9289-Jul-07 11:23 
AnswerRe: Linker Error 2001 Pin
Mark Salsbery9-Jul-07 11:43
Mark Salsbery9-Jul-07 11:43 
GeneralRe: Linker Error 2001 Pin
moonraker9289-Jul-07 12:04
moonraker9289-Jul-07 12:04 
QuestionRe: Linker Error 2001 Pin
Mark Salsbery9-Jul-07 12:09
Mark Salsbery9-Jul-07 12:09 
AnswerRe: Linker Error 2001 Pin
moonraker9289-Jul-07 12:16
moonraker9289-Jul-07 12:16 
GeneralRe: Linker Error 2001 Pin
Mark Salsbery9-Jul-07 12:24
Mark Salsbery9-Jul-07 12:24 
GeneralRe: Linker Error 2001 Pin
moonraker9289-Jul-07 12:41
moonraker9289-Jul-07 12:41 
QuestionRe: Linker Error 2001 Pin
Mark Salsbery9-Jul-07 12:56
Mark Salsbery9-Jul-07 12:56 
GeneralRe: Linker Error 2001 Pin
Mark Salsbery9-Jul-07 13:04
Mark Salsbery9-Jul-07 13:04 
GeneralRe: Linker Error 2001 Pin
moonraker9289-Jul-07 13:17
moonraker9289-Jul-07 13:17 
GeneralRe: Linker Error 2001 Pin
Mark Salsbery9-Jul-07 13:32
Mark Salsbery9-Jul-07 13:32 
GeneralRe: Linker Error 2001 Pin
Bram van Kampen9-Jul-07 14:48
Bram van Kampen9-Jul-07 14:48 
GeneralRe: Linker Error 2001 Pin
moonraker92810-Jul-07 9:12
moonraker92810-Jul-07 9:12 
GeneralRe: Linker Error 2001 Pin
David Crow10-Jul-07 2:44
David Crow10-Jul-07 2:44 

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.