'Text File to Vector In C++
I'm having trouble getting elements of a text file into a vector for CS homework. I'm getting stuck on what to put as the condition for the while loop I'm using to fill the vector.
while(inFile >> ?)
{
vector.push_back();
}
I've tried the name of the vector as the condition and looked up this same question on Google, but all I get is formatting like (std : : ). I haven't learned that yet, so I can't use it.
Please help!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
