I have a read function which takes numbers from a text file and stored them into a data structure. I have made this function.
void VectorIntStorage::read(ifstream &in)
{
if(in.is_open())
{
for (int i = 0; in && i < n; ++ i)
{
in >> vectorStorage<i>;
}
}
}
I am trying to add them into a vector structure, is this code correct??