Ah, that's what it was! "%[^\n]". Now I know.
Usually one thread about one program is sufficient . . .For my personal culture I'll post a new thread and if no one know, I'll take your idea.
Ah, that's what it was! "%[^\n]". Now I know.
Usually one thread about one program is sufficient . . .For my personal culture I'll post a new thread and if no one know, I'll take your idea.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
I was wondering already how the regexp [^ ] would have worked in this situation, since it is interpreted as "everything not a space". The correct version, the one you posted, is interpreted as "everything not a new line char" which makes more sense
Yes, I don't know what I was thinking.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
By the way, when I read the numbers in my float, I would like that my sscanf dosn't ad 0 like he does (when I display my float, he show me 40.000000 instead of 40.0000) or (850.50000 instead of 850.5000). Can I use sscanf just to display the exact number while staying a float. (If there is no way I'll just print a string and after put him as a float to use this number later in my program)
Last edited by nevrax; 04-14-2007 at 09:40 PM.
Your issue is with printf, not sscanf.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*