Dec 14, 2010 at 2:44pm UTC
l ran this code , and l get this error 19 times .
what that error is for ?
error :
--------------------Configuration: examen final - Win32 Debug--------------------
Compiling...
examen final.cpp
c:\program files\microsoft visual studio\vc98\tutorial...: error C2018: unknown character '0xa0'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include "conio.h"
#include "stdio.h"
#include "ctype.h"
void main(){
char cad1[100], *ptr_cad1;
char cad2[100], *ptr_cad2;
printf("Dame la cadena: " );gets(cad1); ptr_cad1=cad1;
ptr_cad2=cad2;
do
{
*ptr_cad2=*ptr_cad1; *ptr_cad2++;
} while (*ptr_cad1++);
ptr_cad2=cad2;
do
{ printf("%c" ,*ptr_cad2);
}while (*ptr_cad2++);
getch();
}
Last edited on Dec 14, 2010 at 2:46pm UTC
Dec 14, 2010 at 3:15pm UTC
Hi,
It compiles and runs ok here.
I suggest you have a closer look at the error message, as it should be showing the
file that the error is in as well as the line number.
Shredded
Dec 14, 2010 at 7:05pm UTC
Probably you have a carriage return (or any other wild char) inside a string. You don't give too much of the error, so it might happen because it happens in any of the included files.
Cheers
Dec 14, 2010 at 9:21pm UTC
thanks you guys
so what should l do ? l just don't understand yet .
Dec 15, 2010 at 6:03am UTC
Hi
Try compiling again and give us the full error message and we might be able to help