I have the following sscanf:
int four;
sscanf("1234&awe$asdf@3222*gr45", format, four);
I want this sscanf to put the value 3222 in the variable four.
What should be the format string?
& $ @ and * always stays the same. So other example of string inputs can be:
"6345&346dfh$aweg@5463*nvm" -> and four will be 5463
"0hjgf&456d$fhg@05645*pogyu" -> and four will be 05645
Im sorry if im not clear enough. Im trying to be as clearest as possible.
Edit: I think that the way is this:
sscanf("1234&awe$asdf@3222*gr45", "@%d*", four);
Any other ways?