i'm trying to use string stream to get data from an input file. the program works until it get's to adding the elements to the array.
i'm still not completely sure how to make use of stringstream yet or if i'm using it right.
ifstream ipf;
ipf.open(test.txt);
char c;
int size, FSize = 0;
unsigned char** UCarray = new unsigned char* [size];
stringstream str;
while(!ipf.eof())
{
ipf.get(c);
if ((c=='\n')||(c==' '))
FSize++;
}
size = FSize;
UCarray[size];
ipf.seekg (0, ios::beg);
for(int i = 0;i<size;i++)
{
str<<ipf;
str >> UCarray[i];
}
any help will be greatly appreciated.