Thread: Using Visual C++ for C programming

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    12

    Using Visual C++ for C programming

    Hi all:

    I am wondering can I use Visual C++ for C program IDE. It seems to me that Visual C++ does recognize C program, but when I am going to create a project for C using Visual C++, it has no option for a new C project. Thanks!!

  2. #2
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Give your source files a .c extension instead of .cpp (or whatever you use for C++) and it should compile them as C. Should
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #3
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    You could also try -

    Project > 'ProjectName' Properties > C/C++ > Advanced > Compile As >

    And then you have an option of C, C++ or default. I guess default checks and makes up it's own mind. This is on MSVC++ '03 btw

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    12
    thank! I find it too.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM