Hi all,
I want to get characters from a disk file and storing them in an array of characters.But i do not want to add Spaces in the array.Wat shuold i do now.Because spaces are being stored as a character in the array.
Hi all,
I want to get characters from a disk file and storing them in an array of characters.But i do not want to add Spaces in the array.Wat shuold i do now.Because spaces are being stored as a character in the array.
Read one character at a time, then use an if statement to choose whether to store it in your variable.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Consider searching the forums ,
Several posts demonstrating Salem's method: http://cboard.cprogramming.com/showt...ore+whitespace
Thanxxx Salem,zacs
i am going to try this one