int main(int argc, char *argv[])
{
ifstream ifile;
string text[Max];
string line;
//string line;
int size = 0; //size = 단어의 수
ifile.open("token.txt");
if (!ifile.is_open())
{
cout << "Text is error!" << endl;
return 0;
}
else {
while (getline(ifile,line))
{
text[size]=line;
cout << text[size]<<" "; //문제가 되는 이부분
size++;
}
}
cout << endl;
mx = size;
cout << "Word lenghth MAX is 20" << endl;
//msd_radixsort(text, size);
//for (int i = 0; i < size; i++)
// cout << text[i] << endl;
return 0;
}
저가 우분투로 c++ 파일을 컴파일 하고 실행하는데 윈도우에서는 출력이 잘 됩니다.
하지만 우분투로 출력하니깐 깨져서 출력이 되더라구요....대체 뭐가 문제인지 모르겠습니다....