G
grubbymaster
hello
i'm extracting from a file numbers that are stored on each line.
this is the only way i know to extract each line at a time from a file
, using <fstream> <ostream> :
char buffer[32];
ifstream LZW(sz_path);
while(!LZW.eof())
{
memset(buffer, 0, sizeof(buffer));
LZW.getline(buffer, sizeof(buffer)-1);
}
// buffer holds for example : "123" and i want to convert it to int x =
123 so that i can work with it later , like for example my_array[123] =
......
can anybody provide help in this aspect.
thank you,
alex
i'm extracting from a file numbers that are stored on each line.
this is the only way i know to extract each line at a time from a file
, using <fstream> <ostream> :
char buffer[32];
ifstream LZW(sz_path);
while(!LZW.eof())
{
memset(buffer, 0, sizeof(buffer));
LZW.getline(buffer, sizeof(buffer)-1);
}
// buffer holds for example : "123" and i want to convert it to int x =
123 so that i can work with it later , like for example my_array[123] =
......
can anybody provide help in this aspect.
thank you,
alex