Lets say I have a string "MyName(10)"
I want to check a string ending with (%i)
and assign that number in a variable.
I tried sscanf
but its not working.
sscanf("MyName(10), "%s(%i)", tempName, &count);
Its storing MyName(10)
in tempName
and count
is 0
.
MyName
can be variable length , its not fixed as "MyName"
it can be "Mynaaaaaame"
.