rainbow.cpp:23:50: error: ISO C++ forbids declaration of 'init' with no type [-fpermissive]
init(int R, int C, int sr, int sc, int M, char *S) {
^
rainbow.cpp: In function 'int init(int, int, int, int, int, char*)':
rainbow.cpp:23:1: error: ambiguating new declaration of 'int init(int, int, int, int, int, char*)'
init(int R, int C, int sr, int sc, int M, char *S) {
^~~~
In file included from rainbow.cpp:2:0:
rainbow.h:4:6: note: old declaration 'void init(int, int, int, int, int, char*)'
void init(int R, int C, int sr, int sc, int M, char *S);
^~~~
rainbow.cpp:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
rainbow.cpp: In function 'void colour(int, int, int, int)':
rainbow.cpp:48:6: error: ambiguating new declaration of 'void colour(int, int, int, int)'
void colour(int ar, int ac, int br, int bc) {
^~~~~~
In file included from rainbow.cpp:2:0:
rainbow.h:5:5: note: old declaration 'int colour(int, int, int, int)'
int colour(int ar, int ac, int br, int bc);
^~~~~~
rainbow.cpp:119:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return l-2+1;
^