hello...

i want to separate string like "!string"
i need to put the "string" to some char*...

i did

char firstWord[10];
sscanf(text,"!%s",firstWord);

why its not woking? and how to make it work?

i try to search, but nada....

hey, it didnt hepled me, its refered to stringswith whitespaces
but in my case i dont have spaces between the words....

any options?

hey, it didnt hepled me, its refered to stringswith whitespaces
but in my case i dont have spaces between the words....

any options?

Did you try 'googling scanf regular expression '

Or did you try searching this site

http://www.daniweb.com/forums/thread242643.html

Narue has a link in the above posting that may help

How about

char dummy;
char firstWord[10];
sscanf(text,"%c%s",&dummy, firstWord);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.