for instance like:
12 32 323 342
12 3213 23 12
and store them into a array
Printable View
for instance like:
12 32 323 342
12 3213 23 12
and store them into a array
Something like this:
#include <fstream>
using std::ifstream;
int main()
{
char *filename = "in.txt";
ifstream in(filename);
int ar[1000];
int i = 0;
while (in)
{
in >> ar[i++];
}
return 0;
}
Please - rate answer if it helped you
It gives me inspiration when I see myself in the top list =)
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
[email protected] | ICQ:57404554 | http://soukhov.com
Member of Russian Software Developer Network http://rsdn.ru
thank you