Thread: Visual c++ 2005 express edition to run .c files

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Visual c++ 2005 express edition to run .c files

    Hi, I'm new to the board and also to programming in c/c++. I'm trying to work my way through the book "A Book on c" by Kelley/Pohl". I have turbo c up and running on my laptop and can easily use it to compile and run .c programs.

    I also downloaded the free edition of Microsoft Visual c++ 2005 express edition for the same purpose. However, I can't manage to use it to compile and run .c programs -- I can only manage .c++ programs mainly with the help of Google and Microsoft webpages.

    Can MSVC++2005EE be used for programming in c? If so, would anyone be kind enough to tell me how to do so?

    Thanks very much.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    create an empty project
    create a new cpp file
    save it as c-file (with c extention)
    remove cpp file from the project
    add c-file to project
    check in the option that the compiler is used according to the extention instead of C++ always

    after that the code in c-files will be compiled as C
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    3
    Quote Originally Posted by vart View Post
    create an empty project
    create a new cpp file
    save it as c-file (with c extention)
    remove cpp file from the project
    add c-file to project
    check in the option that the compiler is used according to the extention instead of C++ always

    after that the code in c-files will be compiled as C

    Hi vart, that's great thanks. I just couldn't manage to "check in the option that the compiler is used according to the extention instead of C++ always".

    Do I look under tools-->options-->???

    Thanks very much again!

    EDIT: I managed to compile a basic .c program without changing any options. Thanks.
    Last edited by the_fall_guy; 04-02-2007 at 02:49 PM. Reason: Made progress.

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    When opening project properties
    Configuration Properties/ C/C++ /Advanced/Compile As - set to Default - in this case compiler will be choosen according to the file extention C for c-files and C++ for cpp-files
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Thumbs up

    Thanks again. That did the trick.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. VC++ 2005 Express Edition with PSDK
    By TylerMoyer in forum C++ Programming
    Replies: 2
    Last Post: 09-28-2007, 09:01 AM
  2. Visual Studio Express for free
    By Frobozz in forum C# Programming
    Replies: 2
    Last Post: 04-29-2006, 09:59 PM
  3. visual C++ 2005 Express: LPSTR error
    By Rune Hunter in forum C++ Programming
    Replies: 2
    Last Post: 11-11-2005, 07:23 PM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM