|
-
February 1st, 2005, 01:09 AM
#1
Duplicating a struct
I have a this following struct in my program.
-------------------------------------------
struct mytext{
char text[1024]; //will store each individual lines of the textfile
char unfield[1024];
char field[1024]; //will store each column from each line
char reversed[1024];
};
-------------------------------------------
I created in a method called work()
mytext st[1024];
and I have another method called void sort()
and I want to pass st from work to sort(st) but when I tried to call the data stored in the struct from sort() method, i cant reference the data.
Could someone help me with how i can pass a struct from one method to another without erasing any data in the stuct??
Thanks
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
|