Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WordReplacer::WordReplacer(string path) {
- ifstream ifs(path);
- size=0;
- if(!ifs.is_open()) {
- wordArray=NULL;
- return;
- }
- string word;
- while(ifs>>word) size++; // ???
- wordArray=new string[size];
- ifs.clear(); // ???
- ifs.seekg(0,ios::beg); // ???
- for(int i=0; i<size; i++) // ???
- ifs>>wordArray[i]; // ???
- ifs.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement