sscanf(a+h,"%s",ch);这句是什么意思
char a[100],ch[100];
[解决办法]
h的值是多少?
就是从指针a开始偏移h的地方,读一个字符串出来,存在ch里。
[解决办法]
int sscanf( const char *buffer, const char *format [, argument ] ... );
Parameters
buffer
Stored data
format
Format-control string
argument
Optional arguments
Libraries
All versions of the C run-time libraries.
Return Value
Each of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is EOF for an error or if the end of the string is reached before the first conversion.
简单的说:从a+h处取一个字符串,存放到ch处
[解决办法]