you code, after pause();, is not in a function at all. Also, I'm not sure if you are able to put a ';' in a statement, like you did in the while statement. And at last, keep in mind that there is still a '}' after the system function.
I copied the code my lecturer wrote otherwise what is after pause can you see any way to fix it.
as far as the brace after the complier stated to but a brace as a warning i don't think it is necessary though and the ; in the while again was listed.
Thanks
I know the program ends after line 15 the problem being that the code it has for this is
i garbled it myself as well i think i was getting flustered as far as the functions go
the code i had should of been
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# include <iostream>
usingnamespace std;
void clrscr( ); //Prototype
int main ()
{
cout << "Calling function Clear Screen\n";
clrscr( ) ;
}
void clrscr( ) //Implementation
{
system( "pause" );
}
for the clear screen etc
same for the pause function though
as they were pieces but i will admit i didn't declare the function correctly above but that can be changed by adding another function in it is the section with the skipblanks and char ch that is my primary concern as i can make it clearscreen but i need to add another void CLRSCR() and VOid pause () i believe as that is what i have in the original code which doesn't have compiler errors
though then again i am happy to be corrected. furthermore a rewrite would be fine as long as it uses the void pause,Void cls and void skip blanks though all the functions are meant to be called using the pause () etc type call just prototyped with the void statements. if someone can write me a fucntion to skip the blanks using the code provided i can rework the code fine.