关于sscanf的用法
String buf = "中国,北京,2,5";
String a,b;
int x,y;
sscanf( buf.c_str(), "%[^,],%s,%d,%d",
a.c_str(), b.c_str() ,&x, &y);
为啥解不出来字符串呢?错在哪里了?
String a,b;
int x,y;
sscanf( buf.c_str(), "%[^,],%s,%d,%d",
a.c_str(), b.c_str() ,&x, &y);
为啥解不出来字符串呢?错在哪里了?
...全文


