Where is my constant string for syntax? I am getting errors? I am following printf functions. My code has to be right. I know it is right. Why am I getting syntax errors?
Here are the errors:
Quote:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
H:\Documents and Settings\baseball>gcc programming.c -o programming.exe
programming.c:1: error: syntax error before string constant
programming.c:1: warning: conflicting types for built-in function 'printf'
programming.c:1: warning: data definition has no type or storage class
programming.c:3: error: syntax error before string constant
programming.c:3: warning: data definition has no type or storage class
programming.c:5: error: syntax error before string constant
programming.c:5: warning: data definition has no type or storage class
programming.c:5:64: warning: no newline at end of file
H:\Documents and Settings\baseball>
code: |
printf("I am a simple ");
printf("computer.\n");
printf("My favorite number is %d because it is first.\n", num); |