#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
void main()
{
char info[81];
string names[5];
double sales[5][5];
int count = 0;
int x = 0;
ifstream file;
file.open("sales.txt");
while(!file.eof())
{
x = 0;
file.getline(info, 80);
while(info[x] != (char)39)
{
while(info[x] != ' ')
{
names[count] += info[x];
x++;
}
x++;
for(int y = 0; y < 4; y++)
{
sales[count][atoi(&info[x])] = (atoi(&info[x + 1]) * 10) + atoi(&info[x+2]) + (.01 *((atoi(&info[x+4])*10) + atoi(&info[x+5])));
x += 7;
}
x++;
}
count++;
}
}
これを実行すると実行時エラーが発生しますが、正確な理由がわかりません。コンパイラのデバッガにあまり慣れていないので、デバッグに問題があります。