This is a function my professor wrote on the board. It is supposed to write a word in reverse order. However I cannot seem to compile and run it.Code:void writeback(char n[]) { string a; if(strlen(n)>1) { writeback(substr(n,1)); } cout << n[0]; }
I have copied down exactly as he has written it on the board but the part where I bold throws off an error during compile. Could you see what is wrong with this code?