pointer to a structure.
How do I express the address of a member of that
structucture in the function using this pointer?
For example I have this function who uses sscanf to
copy a string to a member of a structure.
&parse.value does not work because the function does
not know the structure parse, it knows about a pointer
containing the address of the structure parse. Thanks in advance for all the help.
Expand|Select|Wrap|Line Numbers
- static int parse_sscanf( char * in_str, struct parse_s
- * parse_struct )
- {
- int result;
- result = sscanf(in_str, "%f %s", &parse.value,
- &parse.name);
- if (result == EOF)
- {
- return FALSE;
- }
- else
- {
- return TRUE
- }
- }