I am a freshman about Code::Block. I can run the code by itself in the Code::Block, produce ''Hello world!''. However, don't run the small code, as follow:
main()
{
int i,j,k;
printf("\n");
for(i=1; i<5; i++)
for(j=1; j<5; j++)¡¡
for (k=1; k<5; k++)
{
if (i!=k&&i!=j&&j!=k)
printf("%d,%d,%d\n",i,j,k);
}
}
The Block Log says that:
mingw32-g++.exe -c ji.cpp -o ji.o
ji.cpp:6:9: error: stray '\302' in program
for(j=1; j<5; j++)隆隆
^
ji.cpp:6:9: error: stray '\241' in program
ji.cpp:6:9: error: stray '\302' in program
ji.cpp:6:9: error: stray '\241' in program
ji.cpp: In function 'int main()':
ji.cpp:4:16: error: 'printf' was not declared in this scope
printf("\n");
^
Process terminated with status 1 (0 minute(s), 0 second(s))
5 error(s), 0 warning(s) (0 minute(s), 0 second(s))
-------------- Run: Debug in xz (compiler: GNU GCC Compiler)---------------
Checking for existence: C:\Users\Administrator\Desktop\xz\bin\Debug\xz.exe
Executing: "C:\CodeBlocks/cb_console_runner.exe" "C:\Users\Administrator\Desktop\xz\bin\Debug\xz.exe" (in C:\Users\Administrator\Desktop\xz\.)
Process terminated with status -1073741510 (0 minute(s), 2 second(s))
-------------- Run: Debug in xz (compiler: GNU GCC Compiler)---------------
Checking for existence: C:\Users\Administrator\Desktop\xz\bin\Debug\xz.exe
Executing: "C:\CodeBlocks/cb_console_runner.exe" "C:\Users\Administrator\Desktop\xz\bin\Debug\xz.exe" (in C:\Users\Administrator\Desktop\xz\.)
Process terminated with status -1073741510 (0 minute(s), 1 second(s))
I have no idea about this! Could you tell me how can run the small code correctly?