Thread: How do I add .C Project to my complier?

  1. #16
    Registered User
    Join Date
    Sep 2008
    Posts
    34
    also you should use
    Code:
    }   at the end instead of {

  2. #17
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Elysia View Post
    Have you ever studied a C book at all?
    I didn't mean you to include the quotes.
    Code:
    int main()
    {
        printf("Hello world!\n");
    }
    You may not realize, but if you don't use code tags, your code will look messed up in the forum.
    There a symbol that looks like #. Select your code, then select that button and it will look right.


    It's failing again. I don't know where the code tags are.

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Just saying it's failing doesn't help.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #19
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Code:
    int main ()
    {
    	printf ("Hello world!\n") ;
    
    
    }

    That is the code I used, and it's failing again.

  5. #20
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Heh... That amused me. I would turn that into a sig, but it would be even more obtrusive than my current sig.

  6. #21
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    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.

  7. #22
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    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?)

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Oh snap, where is that link to how to write a meaningful reply to get help?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #24
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    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");

  10. #25
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by Elysia View Post
    Oh damn, where is that link to how to write a meaningful reply to get help?
    What, this one?

  11. #26
    Registered User
    Join Date
    Sep 2008
    Posts
    34
    you forgot the
    Code:
    }
    again

  12. #27
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Screw it...

    OP, try this:

    Example:
    Code:
    #include <stdio.h>
    
    int main(void)
    {
      printf("Hello world!\n");
      getchar();
    }
    Does it not fail now?

  13. #28
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Come on, you can put all the pieces together yourself. Where's your right brace at the end?

  14. #29
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    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.

    Quote Originally Posted by tabstop View Post
    What, this one?
    Yes, that one!
    I actually found it, but didn't have the time / didn't find the time worth it to post it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #30
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Dude... why are you trying to compile a header?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem about making setup project
    By sgh in forum Windows Programming
    Replies: 0
    Last Post: 04-30-2008, 03:09 AM
  2. Add a VS 2K8 express template for .c
    By vtechv in forum C Programming
    Replies: 2
    Last Post: 02-11-2008, 03:13 AM
  3. How to add a file to a project in bloodshed.
    By Smeep in forum C++ Programming
    Replies: 4
    Last Post: 04-22-2005, 09:29 PM
  4. Project details: Dedicated
    By Stack Overflow in forum Projects and Job Recruitment
    Replies: 9
    Last Post: 02-22-2005, 03:10 PM
  5. Can somebody test this code please
    By andy bee in forum C Programming
    Replies: 6
    Last Post: 10-09-2001, 03:08 PM