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

This is a discussion on Visual c++ 2005 express edition to run .c files within the C Programming forums, part of the General Programming Boards category; Hi, I'm new to the board and also to programming in c/c++. I'm trying to work my way through the ...

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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 03:49 PM. Reason: Made progress.

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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, 10:01 AM
  2. Visual Studio Express for free
    By Frobozz in forum C# Programming
    Replies: 2
    Last Post: 04-29-2006, 10: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, 11:03 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 11:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21