CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #5
    Join Date
    Oct 2005
    Posts
    8

    Re: Errors from [testing...]

    Here is a program I actually got, and don't know where to go on since some problems I would like to understand more are still there, as you once mentioned, right in the following source code...

    PHP Code:
    struct ss{
        
    int func(){
            
    int i;
            
    char c;
            ...
            
    struct s{    
                
    int funci(){
                    return ::
    i;}
                
    //some others
            
    };
            
    //do something with struct;
            
    return somenumber;
        }
        
    int funcContinue(){
            
    //code to call recursively this function
        
    }
        
    int i;    
    };
            
    int main(){
        
    //testing...
        
    sspss=new struct ss;
        
    sps;//Could you tell me how to initialize ps here ? since I want to use it.
        //pss was mistaken in place of ps and now has been already corrected.
        
    int geti    =     pss->func();
        
    int getii    =     pss->i;
        
    //using ps to get i variable 
        
    int getiii    =    pss->ps->funci();
        
        
    assert(geti==getii);

        
    //do other things...

        
    return 0;

    Thanks a lot
    Last edited by Cungtrang; October 23rd, 2005 at 09:22 AM. Reason: Clearify the source code
    ......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured