This post is related to another post, but instead of editing the post, i decided to ask the same question in a different way.
If you do consider this as reposting, i am really sorry.
IMPORTANT:-
*I have decided to write out the problems , instead of posting a hundred line post containing 80 lines of C code.
*The contents in the detail tags are additional information that might be of some help.
I have a structure named as node structure is
Code:
structure node{
int rownum;
char rowbuff[MAXCOL]// --MAXCOL is a sybolic definition that is used to indicate, in this
//-- context the length of the string
struct node *nextrow;
}
<detail>
This structure used to store the data in each row in my text editor;
There is another pointer to the target row being manipulated upon named "temp"
</detail>
**I am passing this structure to a function using pass by reference, i.e a pointer to the structure. **
How do i access base address of "rowbuff" so that i can copy another string (which *will not* overflow rowbuff )
named "tempbuff" so that i can copy the contents of "tempbuf" to "rowbuff" using strcpy function call.
How do i access the next row (not the address of the next row, but the next row).
<QUESTIONS>
1) In the structure definition can i initialize every "nextrow" pointer to null.
2) How do i make "temp" at the end of this function to point to the next row structure.
</QUESTION>
<detail>
Detail regarding question 2
I might use another global pointer to point to the next structure at the end of this function .
</detail>
See this post for some incomplete information