Is there a way to define an arrays size using a file? I have a file with 5 names and scores, I don't want to define a specific number to the array just in case I want to add more names and scores to it.
here is what I got so far.
1 2 3 4 5 6 7 8 9
int num;
string filename;
cin >> filename;
ifstream thename (filename);
vector<string> thenames[num];
vector<double> thescores[num];
for (int p = 0; p < num; p++){
inputname >> thenames[i]>>thescores[i];
}