|
-
October 23rd, 2005, 09:13 AM
#5
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...
ss* pss=new struct ss;
s* ps;//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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|