Upload data from .txt into std::set
hi,
i'm trying to upload data from a .txt file into a std::set.
i saved the data from the std::set into the .txt file successfully, but know, when i do the upload into the std::set the data is messed up :-(
this is what happens...
saved .txt file (everything ok):
Code:
//'\n'
ID
type
detail
cost
weight
uploaded data into the std::set:
Code:
Product 1:
cost
weight
Product 2:
ID
type
detail
cost
weight
this is my upload function:
Code:
void grocery::loadProducts(string nameFile)
{
...
...
while(data)
{
data.ignore (100,'\n');
data.getline (str,100);
i = str;
...
...
data>> c;
...
}
}
what am i doing wrong ??