/in/foo.cc: In function 'int Clever(float*)':
/in/foo.cc:3:17: error: expected ']' before ';' token
#define MAX 1000;
^
/in/foo.cc:7:10: note: in expansion of macro 'MAX'
float a[MAX];
^~~
/in/foo.cc:7:13: error: expected primary-expression before ']' token
float a[MAX];
^
/in/foo.cc:3:17: error: expected ']' before ';' token
#define MAX 1000;
^
/in/foo.cc:8:9: note: in expansion of macro 'MAX'
cin>>a[MAX];
^~~
/in/foo.cc:8:12: error: expected primary-expression before ']' token
cin>>a[MAX];
^
/in/foo.cc:10:12: warning: 'sizeof' on array function parameter 'a' will return size of 'float*' [-Wsizeof-array-argument]
i=sizeof(a);
^
/in/foo.cc:5:20: note: declared here
int Clever(float a[])
^
/in/foo.cc:11:5: error: invalid operands of types 'float*' and 'int' to binary 'operator%'
j=a%3;
~^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:3:17: error: expected ']' before ';' token
#define MAX 1000;
^
/in/foo.cc:27:10: note: in expansion of macro 'MAX'
float a[MAX];
^~~
/in/foo.cc:27:13: error: expected primary-expression before ']' token
float a[MAX];
^
/in/foo.cc:28:7: error: 'a' was not declared in this scope
cin>>a[MAX];
^
/in/foo.cc:3:17: error: expected ']' before ';' token
#define MAX 1000;
^
/in/foo.cc:28:9: note: in expansion of macro 'MAX'
cin>>a[MAX];
^~~
/in/foo.cc:28:12: error: expected primary-expression before ']' token
cin>>a[MAX];
^
/in/foo.cc:3:17: error: expected ']' before ';' token
#define MAX 1000;
^
/in/foo.cc:29:11: note: in expansion of macro 'MAX'
Clever(a[MAX]);
^~~
/in/foo.cc:29:14: error: expected primary-expression before ']' token
Clever(a[MAX]);
^