![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic OS question | catwomen | HP-UX | 4 | 09-08-2006 05:39 PM |
| a very basic question regarding gcc... | caltiger | High Level Programming | 2 | 09-04-2006 04:16 AM |
| Really basic question.... | robherms | UNIX for Dummies Questions & Answers | 1 | 02-17-2006 06:50 AM |
| basic question | urwannabefriend | UNIX for Dummies Questions & Answers | 1 | 04-10-2004 02:21 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
q_zero question basic C
What am I doing wrong?...
My code looks like this: [File: q_zero/q_zero.c] #include <stdio.h> float answer; /* The result of our calculation */ int main() { answer = 1.0 / 3.0; printf(“The value of 1/3 is %f\n”, answer); return (0); } ==============================END And this is what I get in terminal when I try to compile it: [localhost:~/learning_c] aaron% gcc q_zero.c o-q_zero powerpc-apple-darwin8-gcc-4.0.1: o-q_zero: No such file or directory q_zero.c: In function 'main': q_zero.c:8: error: stray '\210' in program q_zero.c:8: error: 'The' undeclared (first use in this function) q_zero.c:8: error: (Each undeclared identifier is reported only once q_zero.c:8: error: for each function it appears in.) q_zero.c:8: error: parse error before 'value' q_zero.c:8: error: stray '\' in program q_zero.c:8: error: stray '\211' in program [localhost:~/learning_c] aaron% |
| Forum Sponsor | ||
|
|
|
|||
|
The code looks the same. It's the quote characters you are using. You aren't using ascii characters, they are unicode characters. Change them to ascii characters. The ascii representation for quote character (") is stored as 22 hexadecimal, or 34 decimal.
|