What's wrong!!!!!!!!!

I made this source-code but i can't run it:
#include <stdio.h>
#include <string.h>
void reverse (char *s)
{
int c,i,j;

for ( i = 0 , j = strlen(s)-1;i<j;i++,j--)
{
c = s [ i ] ;
s [ i ] = s [ j ] ;
s [ j ] = c ;
}

}
Well it would help if you had a call to main in there somewhere....
you mean instead to put void reverse (char *s) to put main()
I think you need to back up a bit and start with the absolute basics. http://www.cplusplus.com/doc/tutorial/program_structure/
Topic archived. No new replies allowed.