Simple C++ question

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
annex666 said:
Is there a standard c++ function to read tab-seperated files?

Not directly. Here's how you might do this:

1) Use an ifstream file stream object and use its getline() function to get each line of the file into a character buffer.

2) Use the standard C function strtok() on the buffer, passing in "\t" as the delimiter. Each call to strtok() will put a null byte in the next occurrence of the tab character and return a pointer to the beginning the token.
 
andy_c said:
It's really excellent.

Hmmm... excellent? I found that a book may be "excellent" to one reader, may be not to others, depending on the skill level of the reader, and preferency in learning strategies.

That is for beginners who need the book for learning. For experts, the book may only be needed for reference, and hence completeness is more important than structure.
 
andy_c said:
What specific complaints do you have about the book, and what would you recommend as an alternative?

I thought it was a "free" book like what Christer had posted. Didn't see the amazon. So I wouldn't easily be persuaded to buy even if it is highly recommended :). Anyway, I prefer that kind of "C++ in One Night!" :D
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.