|
-
December 3rd, 2008, 08:25 PM
#2
Re: Determining the number of unique words in a .txt file
getline(inFile, line) doesn't exist for character arrays----that's a special overload for std::strings. The one you want for a char array looks like inFile.getline(line,length). Reference here:
http://www.cplusplus.com/reference/i...m/getline.html
I have to use character arrays instead of strings.
I must use the linear search (something that looks like this)
Shame, without these restrictions you could write the program in about 10 lines using a std::map.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|