Code:
while (!Graph.eof())
Nope. Look at the other posts in this thread, and even your own example that you posted first.
Graph>> Matrika[j][i]; // Matrika = matrice in which the numbers from the file are saved
should skip commas automatically, so you should be able to remove that Graph>>buu; line.
Doesn't work for me:
Code:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream inFile("C:\\TestData\\data.txt");
/* data.txt:
-1,55,25,45,-1,-1,-1,-1
*/
int num[10] = {0};
inFile>>num[0];
cout<<num[0]<<endl; //-1
inFile>>num[1];
cout<<num[1]<<endl; //0 ???
return 0;
}