How can I get string like "Ac milan" and "Real Madryt" if they are separated with whitespace?
Here is my attempt:
string linia = "Ac milan ; Real Madryt ; 0 ; 2";
str = new char [linia.size()+1];
strcpy(str, linia.c_str());
sscanf(str, "%s ; %s ; %d ; %d", a, b, &c, &d);
but it doesn't work; I have: a= Ac;
b = (null); c=0; d=2;