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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C in Visual Studio

  • 19-09-2009 8: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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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