August 22nd, 2003, 01:05 AM
look at the string functions like
strstr() (or lstrstr() )
strcmp() (or lstrcmp() )
Post some code and we will correct.
It may be better to write the file in binary. Unless you want to be able to read the actual file (in notepad ect)
In binary you can create a structure.
Then you can read and write the file using the structure. Much simpler than a text file as the size of each record is constant (which is not true for a text file).
The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.
August 22nd, 2003, 09:06 AM
Hi TechNoFear ^_^
yeah...thanks a lot...I have solved it...
I use strcmp to compare the string :)
but now, I have another problem....
it's the switch case...
when I disabled case 2, the program can run very well, but once i enable the case 2...when i compile that time, an error pops up saying that it is an illegal case...
do you know why is this happening?
August 23rd, 2003, 05:15 AM
can’t we use do while inside case?
August 24th, 2003, 07:02 AM
It's best not to do very much inside of a switch statement other than jump to another portion of the program. I'm not sure what the reasons are, but if you ever step through a program's execution while it's in a switch statement, you'll see it jumping around a bit. Better to call a function that will do what you want.
Articles and commentary on web development