Here is my code
char* a[10];
a[0]="'example'";
char* p;
p=strstr(a[0],"'");
I know if strstr can find the ' it returns a pointer which points to first character which is '. I want to take the value between two ' and save it in a[1]. how should I do that?
As a result
a[1] is "example".
Just find the next occurrence of
'and copy the substring:Note that in this case, it would be better to use
strchrto find the single character.