sscanf()用法

时间:2021-04-30 13:25:47

http://blog.chinaunix.net/uid-26284412-id-3189214.html

 #include<cstdio>
#include<cstring>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
#define N 500
int main()
{
char s[] = "(11,LL)";
char ts[];
int a,b,c;
int v;
sscanf(&s[],"%d%s",&v,ts);
printf("%d %s",v,ts); return ;
}