Without knowing what editor you are using, it's pretty difficult to
tell you how to get it to show you non-printing characters.
Can you tell us exactly what errors you are getting from your
compiler?
Thanks.. I am trying to help a neighbors kid. He and myself are both
on Ubuntu. So I was trying to help him a little bit with his homework.
I think he may have used Open Office Word, or when I emailed him back,
he may have cut and paste it from email or something.
I used both the Text Editor in Ubuntu and vi (vim) from the shell. I
can't see any characters, but when I delete some lines, and re-type
some of the code in as I see it, some of the errors go away.
Here are snapshot of the errors before my mods:
prime2.c:3:9: error: #include expects "FILENAME" or <FILENAME>
prime2.c:4:9: error: #include expects "FILENAME" or <FILENAME>
prime2.c:5: error: stray ‘\302’ in program
prime2.c:5: error: stray ‘\240’ in program
prime2.c: In function ‘main’:
prime2.c:7: error: stray ‘\302’ in program
prime2.c:7: error: stray ‘\240’ in program
prime2.c:7: error: stray ‘\302’ in program
<snip>
I then delete that top two include lines and retype it in and it seems
to resolve some of the errors and I get:
prime.c:3: error: stray ‘\302’ in program
prime.c:3: error: stray ‘\240’ in program
prime.c: In function ‘main’:
prime.c:5: error: stray ‘\302’ in program
prime.c:5: error: stray ‘\240’ in program
prime.c:5: error: stray ‘\302’ in program
<snip>
Here is the top part of the code:
#include <stdio.h>
#include <stdbool.h>
int main(void)
{
int number;
int d;
_Bool isPrime; // set to 0 if number is nonprime
int maxNum;
printf("Enter max number: ");
<snip>