#6268: 一直CE 不知道為甚麼


sam574 (liu)

學校 : 國立中興大學
編號 : 15117
來源 : [140.120.15.252]
最後登入時間 :
2014-02-11 16:18:00
a009. 解碼器 -- ACM 458 | From: [60.244.177.7] | 發表日期 : 2012-01-31 20:31

這是程式碼 

#include <iostream>
//#include<stdlib.h>
#include<cstring>
using namespace std;

int main()
{
 do{
  char a[999];
  int size=0;
  cin.get(a,999);
  while(a[size]!='\0')size++;

  for(int i=0;i<size;i++){
   a[i]=a[i]-7;
   cout<<a[i];
  }
  cout<<endl;
 }
 while(cin.get()!=EOF);
 //system("pause");
 return 0;
}

 但是一直顯示CE

CE ()
編譯錯誤

code_1050206.cpp: In function ‘int main()’: code_1050206.cpp:20: error: ‘EOF’ was not declared in this scope
 
各位前輩謝謝指教
 
ZeroJudge Forum