Functions and String in C
See also here
The following works;
char* get_date_from_db()
{
char d[20];
strcpy(d, "somestring");
return (char *) d;
}
char e[20];
strcpy(e,get_date_from_db);
Heisenberg - Digital Alchemist, Software Architect, Automation Specialist and Mechanical Engineer.
Functions and String in C
See also here
The following works;
char* get_date_from_db()
{
char d[20];
strcpy(d, "somestring");
return (char *) d;
}
char e[20];
strcpy(e,get_date_from_db);
No comments:
Post a Comment
Note: only a member of this blog may post a comment.