also you should useCode:} at the end instead of {
also you should useCode:} at the end instead of {
Code:int main () { printf ("Hello world!\n") ; }
That is the code I used, and it's failing again.
Heh... That amused me. I would turn that into a sig, but it would be even more obtrusive than my current sig.
You still didn't say what "failing" means. In this case, it might mean that you forgot the #include line at the top, but who knows.
Oh it fails... ok. Well then I guess it should just quit.
(By the way, ten bucks says the program just opens and closes really fast since there is no pause of any kind. And that constitutes failing--any takers?)
1>------ Build started: Project: C Programming File.c, Configuration: Debug Win32 ------
1>Compiling...
1>C Programming File.c.cpp
1>.\C Programming File.c.cpp(7) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\baseball\my documents\visual studio 2008\projects\c programming file.c\c programming file.c\C Programming File.c.h(3)' was matched
1>Build log was saved at "file://c:\Documents and Settings\baseball\My Documents\Visual Studio 2008\Projects\C Programming File.c\C Programming File.c\Debug\BuildLog.htm"
1>C Programming File.c - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Code:#include <stdio.h> int main() { printf ("Hello world!\n");
What, this one?
you forgot theagainCode:}
Screw it...
OP, try this:
Example:
Does it not fail now?Code:#include <stdio.h> int main(void) { printf("Hello world!\n"); getchar(); }
Come on, you can put all the pieces together yourself. Where's your right brace at the end?
OK seriously, get a book or go read some web tutorials.
We can help you figure out problems, but it just seems that you're missing basic information on how to write C code. Seriously.
We're not here to tutor you.
Yes, that one!
I actually found it, but didn't have the time / didn't find the time worth it to post it.
Dude... why are you trying to compile a header?