Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C in Visual Studio

Options
  • 19-09-2009 9:06pm
    #1
    Closed Accounts Posts: 627 ✭✭✭


    Hi Guys,

    I am learning abit of C by myself and have downloaded a trial version of the new professional version of Visual Studio.

    I am trying to write some C Code but am unsure what to do to ensure that I am using Visual Studio correctly. I have googled a bit on it and have tried saving files as .c but Im sure that i am doing something/many thing wrong!!

    Could someone give me a very simplistic (idiot-proof) step by step way to begin writing C in Visual Studio and after writing, how to see if the code works?

    Cheers and thanks in advance


Comments

  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    Along with having files with .c extensions, pretty sure you need to tell it to compile the stuff as C code. Don't have a copy to hand, but I'd take a look under the Project->Properties dialog, somewhere in advanced compiler settings or something like that.


  • Registered Users Posts: 378 ✭✭gagomes


    just use notepad to create your-program.c and then compile it using cl.exe your-program.c

    Watch out if the cl.exe is in the path environment variable.


  • Registered Users Posts: 2,082 ✭✭✭Tobias Greeshman


    Along with having files with .c extensions, pretty sure you need to tell it to compile the stuff as C code. Don't have a copy to hand, but I'd take a look under the Project->Properties dialog, somewhere in advanced compiler settings or something like that.
    Yep think its Advanced tab, there should be a drop down list for "compile code as". Think the /Tp switch says compile as C++ and /Tc compile as C code, so thats the switch you'll want.


Advertisement