foo.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
#include <stdio.h>
^
foo.cc:3:1: error: stray '\302' in program
^
foo.cc:3:2: error: stray '\240' in program
^
foo.cc:4:4: error: stray '\302' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:5: error: stray '\240' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:18: error: stray '\302' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:19: error: stray '\240' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:24: error: stray '\302' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:25: error: stray '\240' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:29: error: stray '\302' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:30: error: stray '\240' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:38: error: stray '\302' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:39: error: stray '\240' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:43: error: stray '\302' in program
int GetApple(int a[], int height, int n);
^
foo.cc:4:44: error: stray '\240' in program
int GetApple(int a[], int height, int n);
^
foo.cc:5:1: error: stray '\302' in program
^
foo.cc:5:2: error: stray '\240' in program
^
foo.cc:6:1: error: stray '\302' in program
main()
^
foo.cc:6:2: error: stray '\240' in program
main()
^
foo.cc:8:1: error: stray '\302' in program
int i;
^
foo.cc:8:2: error: stray '\240' in program
int i;
^
foo.cc:8:3: error: stray '\302' in program
int i;
^
foo.cc:8:4: error: stray '\240' in program
int i;
^
foo.cc:8:5: error: stray '\302' in program
int i;
^
foo.cc:8:6: error: stray '\240' in program
int i;
^
foo.cc:8:7: error: stray '\302' in program
int i;
^
foo.cc:8:8: error: stray '\240' in program
int i;
^
foo.cc:8:12: error: stray '\302' in program
int i;
^
foo.cc:8:13: error: stray '\240' in program
int i;
^
foo.cc:9:1: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:2: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:3: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:4: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:5: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:6: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:7: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:8: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:12: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:13: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:24: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:25: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:26: error: stray '\302' in program
int a[10]={0}; //苹果的高度
^
foo.cc:9:27: error: stray '\240' in program
int a[10]={0}; //苹果的高度
^
foo.cc:10:1: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:2: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:3: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:4: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:5: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:6: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:7: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:8: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:12: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:13: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:16: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:17: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:18: error: stray '\302' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:10:19: error: stray '\240' in program
int h; //小明的手能够到达的最大高度
^
foo.cc:11:1: error: stray '\302' in program
^
foo.cc:11:2: error: stray '\240' in program
^
foo.cc:11:3: error: stray '\302' in program
^
foo.cc:11:4: error: stray '\240' in program
^
foo.cc:11:5: error: stray '\302' in program
^
foo.cc:11:6: error: stray '\240' in program
^
foo.cc:11:7: error: stray '\302' in program
^
foo.cc:11:8: error: stray '\240' in program
^
foo.cc:11:9: error: stray '\302' in program
^
foo.cc:11:10: error: stray '\240' in program
^
foo.cc:11:11: error: stray '\302' in program
^
foo.cc:11:12: error: stray '\240' in program
^
foo.cc:11:13: error: stray '\302' in program
^
foo.cc:11:14: error: stray '\240' in program
^
foo.cc:11:15: error: stray '\302' in program
^
foo.cc:11:16: error: stray '\240' in program
^
foo.cc:11:17: error: stray '\302' in program
^
foo.cc:11:18: error: stray '\240' in program
^
foo.cc:12:1: error: stray '\302' in program
scanf("%d",&h);
^
foo.cc:12:2: error: stray '\240' in program
scanf("%d",&h);
^
foo.cc:12:3: error: stray '\302' in program
scanf("%d",&h);
^
foo.cc:12:4: error: stray '\240' in program
scanf("%d",&h);
^
foo.cc:12:5: error: stray '\302' in program
scanf("%d",&h);
^
foo.cc:12:6: error: stray '\240' in program
scanf("%d",&h);
^
foo.cc:12:7: error: stray '\302' in program
scanf("%d",&h);
^
foo.cc:12:8: error: stray '\240' in program
scanf("%d",&h);
^
foo.cc:13:1: error: stray '\302' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:2: error: stray '\240' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:3: error: stray '\302' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:4: error: stray '\240' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:5: error: stray '\302' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:6: error: stray '\240' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:7: error: stray '\302' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:13:8: error: stray '\240' in program
printf("%d",GetApple(a,h,10));
^
foo.cc:14:1: error: stray '\302' in program
^
foo.cc:14:2: error: stray '\240' in program
^
foo.cc:15:1: error: stray '\302' in program
system("pause");
^
foo.cc:15:2: error: stray '\240' in program
system("pause");
^
foo.cc:15:3: error: stray '\302' in program
system("pause");
^
foo.cc:15:4: error: stray '\240' in program
system("pause");
^
foo.cc:15:5: error: stray '\302' in program
system("pause");
^
foo.cc:15:6: error: stray '\240' in program
system("pause");
^
foo.cc:15:7: error: stray '\302' in program
system("pause");
^
foo.cc:15:8: error: stray '\240' in program
system("pause");
^
foo.cc:16:1: error: stray '\302' in program
}
^
foo.cc:16:2: error: stray '\240' in program
}
^
foo.cc:17:1: error: stray '\302' in program
^
foo.cc:17:2: error: stray '\240' in program
^
foo.cc:18:1: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:2: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:6: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:7: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:20: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:21: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:26: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:27: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:31: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:32: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:40: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:41: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:45: error: stray '\302' in program
int GetApple(int a[], int height, int n)
^
foo.cc:18:46: error: stray '\240' in program
int GetApple(int a[], int height, int n)
^
foo.cc:19:1: error: stray '\302' in program
{
^
foo.cc:19:2: error: stray '\240' in program
{
^
foo.cc:20:1: error: stray '\302' in program
int i;
^
foo.cc:20:2: error: stray '\240' in program
int i;
^
foo.cc:20:3: error: stray '\302' in program
int i;
^
foo.cc:20:4: error: stray '\240' in program
int i;
^
foo.cc:20:5: error: stray '\302' in program
int i;
^
foo.cc:20:6: error: stray '\240' in program
int i;
^
foo.cc:20:7: error: stray '\302' in program
int i;
^
foo.cc:20:8: error: stray '\240' in program
int i;
^
foo.cc:20:12: error: stray '\302' in program
int i;
^
foo.cc:20:13: error: stray '\240' in program
int i;
^
foo.cc:20:16: error: stray '\302' in program
int i;
^
foo.cc:20:17: error: stray '\240' in program
int i;
^
foo.cc:20:18: error: stray '\302' in program
int i;
^
foo.cc:20:19: error: stray '\240' in program
int i;
^
foo.cc:21:1: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:2: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:3: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:4: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:5: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:6: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:7: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:8: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:12: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:13: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:22: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:23: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:24: error: stray '\302' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:21:25: error: stray '\240' in program
int count=0; //能够摘到的苹果个数
^
foo.cc:22:1: error: stray '\302' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:2: error: stray '\240' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:3: error: stray '\302' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:4: error: stray '\240' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:5: error: stray '\302' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:6: error: stray '\240' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:7: error: stray '\302' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:22:8: error: stray '\240' in program
//用户输入苹果高度的同时判断淘淘是否能够摘到苹果
^
foo.cc:23:1: error: stray '\302' in program
for(i=0;i<n;i++)
^
foo.cc:23:2: error: stray '\240' in program
for(i=0;i<n;i++)
^
foo.cc:23:3: error: stray '\302' in program
for(i=0;i<n;i++)
^
foo.cc:23:4: error: stray '\240' in program
for(i=0;i<n;i++)
^
foo.cc:23:5: error: stray '\302' in program
for(i=0;i<n;i++)
^
foo.cc:23:6: error: stray '\240' in program
for(i=0;i<n;i++)
^
foo.cc:23:7: error: stray '\302' in program
for(i=0;i<n;i++)
^
foo.cc:23:8: error: stray '\240' in program
for(i=0;i<n;i++)
^
foo.cc:24:1: error: stray '\302' in program
{
^
foo.cc:24:2: error: stray '\240' in program
{
^
foo.cc:24:3: error: stray '\302' in program
{
^
foo.cc:24:4: error: stray '\240' in program
{
^
foo.cc:24:5: error: stray '\302' in program
{
^
foo.cc:24:6: error: stray '\240' in program
{
^
foo.cc:24:7: error: stray '\302' in program
{
^
foo.cc:24:8: error: stray '\240' in program
{
^
foo.cc:25:1: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:2: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:3: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:4: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:5: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:6: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:7: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:8: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:9: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:10: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:11: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:12: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:13: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:14: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:25:15: error: stray '\302' in program
scanf(" %d",&a[i]);
^
foo.cc:25:16: error: stray '\240' in program
scanf(" %d",&a[i]);
^
foo.cc:26:1: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:2: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:3: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:4: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:5: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:6: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:7: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:8: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:9: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:10: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:11: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:12: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:13: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:14: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:26:15: error: stray '\302' in program
if(a[i]<=30+height)
^
foo.cc:26:16: error: stray '\240' in program
if(a[i]<=30+height)
^
foo.cc:27:1: error: stray '\302' in program
count++;
^
foo.cc:27:2: error: stray '\240' in program
count++;
^
foo.cc:27:3: error: stray '\302' in program
count++;
^
foo.cc:27:4: error: stray '\240' in program
count++;
^
foo.cc:27:5: error: stray '\302' in program
count++;
^
foo.cc:27:6: error: stray '\240' in program
count++;
^
foo.cc:27:7: error: stray '\302' in program
count++;
^
foo.cc:27:8: error: stray '\240' in program
count++;
^
foo.cc:27:9: error: stray '\302' in program
count++;
^
foo.cc:27:10: error: stray '\240' in program
count++;
^
foo.cc:27:11: error: stray '\302' in program
count++;
^
foo.cc:27:12: error: stray '\240' in program
count++;
^
foo.cc:27:13: error: stray '\302' in program
count++;
^
foo.cc:27:14: error: stray '\240' in program
count++;
^
foo.cc:27:15: error: stray '\302' in program
count++;
^
foo.cc:27:16: error: stray '\240' in program
count++;
^
foo.cc:27:17: error: stray '\302' in program
count++;
^
foo.cc:27:18: error: stray '\240' in program
count++;
^
foo.cc:27:19: error: stray '\302' in program
count++;
^
foo.cc:27:20: error: stray '\240' in program
count++;
^
foo.cc:27:21: error: stray '\302' in program
count++;
^
foo.cc:27:22: error: stray '\240' in program
count++;
^
foo.cc:27:23: error: stray '\302' in program
count++;
^
foo.cc:27:24: error: stray '\240' in program
count++;
^
foo.cc:28:1: error: stray '\302' in program
}
^
foo.cc:28:2: error: stray '\240' in program
}
^
foo.cc:28:3: error: stray '\302' in program
}
^
foo.cc:28:4: error: stray '\240' in program
}
^
foo.cc:28:5: error: stray '\302' in program
}
^
foo.cc:28:6: error: stray '\240' in program
}
^
foo.cc:28:7: error: stray '\302' in program
}
^
foo.cc:28:8: error: stray '\240' in program
}
^
foo.cc:29:1: error: stray '\302' in program
return count;
^
foo.cc:29:2: error: stray '\240' in program
return count;
^
foo.cc:29:3: error: stray '\302' in program
return count;
^
foo.cc:29:4: error: stray '\240' in program
return count;
^
foo.cc:29:5: error: stray '\302' in program
return count;
^
foo.cc:29:6: error: stray '\240' in program
return count;
^
foo.cc:29:7: error: stray '\302' in program
return count;
^
foo.cc:29:8: error: stray '\240' in program
return count;
^
foo.cc:29:15: error: stray '\302' in program
return count;
^
foo.cc:29:16: error: stray '\240' in program
return count;
^
foo.cc:30:1: error: stray '\302' in program
}
^
foo.cc:30:2: error: stray '\240' in program
}
^
foo.cc:6:8: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
foo.cc: In function 'int main()':
foo.cc:12:9: error: 'scanf' was not declared in this scope
scanf("%d",&h);
^~~~~
foo.cc:12:9: note: suggested alternative: 'srand'
scanf("%d",&h);
^~~~~
srand
foo.cc:13:9: error: 'printf' was not declared in this scope
printf("%d",GetApple(a,h,10));
^~~~~~
foo.cc:13:9: note: suggested alternative: 'uint'
printf("%d",GetApple(a,h,10));
^~~~~~
uint
foo.cc:8:14: warning: unused variable 'i' [-Wunused-variable]
int i;
^
foo.cc: In function 'int GetApple(int*, int, int)':
foo.cc:25:17: error: 'scanf' was not declared in this scope
scanf(" %d",&a[i]);
^~~~~
foo.cc:25:17: note: suggested alternative: 'srand'
scanf(" %d",&a[i]);
^~~~~
srand
foo.cc: In function 'int main()':
foo.cc:15:15: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
system("pause");
~~~~~~^~~~~~~~~
自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)