I am trying to teach myself C Programming. I need to know how to execute an application in Visual Studio 2008. I can't find a way to do this!!! It is only the first example aswell which is to simply print out hello
I am trying to teach myself C Programming. I need to know how to execute an application in Visual Studio 2008. I can't find a way to do this!!! It is only the first example aswell which is to simply print out hello
Well in VS2005 you press F5 to run with debug, or CTRL + F5 to run without it.
F5 starts the debugger. Obviously, the program runs slower in the debugger than without. Furthermore, in Debug mode, the console window disappears when the program does as opposed to non-debug mode (but you can use a breakpoint to avoid that).
Also, you DON'T need an empty project. It will create a default project for you that will compile fine (although it creates a C++ file, but you can rename them). Remember that by default it also creates a precompiled header, which means you must add #include "stdafx.h" at the beginning of every source file.
I'm not certain if it includes C++ headers in stdafx.h by default. I don't think so...
I agree that you should just use Visual Studio C++ Express Edition.
It's a complete program, not a trial - and as a beginner I am finding it to be an absolutely superb IDE for learning how to program in C and C++. I've used various other IDEs with other languages and VSC++ is by far and away the best I've ever used. Intellisense is fantastic as a learning tool when you're starting out with things such as passing pointers to structs around and the like. There's many a time it's made me realize exactly what I was doing wrong. I love it.
You do know what a debugger is, I hope?
The only difference is that your program will crash or you will get a runtime error dialog if something goes wrong in non-debugging mode. In debugging mode, the debugger will break where the error occurred.
And debugging mode gives you access to debugging features, naturally.
The option is greyed out in the menu. Don't know if it's down to the type of file i opened, i opened up a text file in the C++ development IDE and then saved it as a .c file.
Last edited by rory-uk; 02-04-2008 at 01:51 PM.
Getting build errors with attempting to do the above. In fact I'm not sure if this version of Visual Studio will allow me to create a C Program. Can anyone give me a link to an IDE for C Programming which I can download for free that works on 64 Bit Home Premium Vista?
1>------ Build started: Project: Test3, Configuration: Debug Win32 ------
1>Compiling manifest to resources...
1>Project : error PRJ0003 : Error spawning 'rc.exe'.
1>Build log was saved at "file://c:\Users\Rory\Documents\Visual Studio 2008\Projects\Test3\Test3\Debug\BuildLog.htm"
1>Test3 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The original file that gets created is a .cpp file, which is a C++ extension and the other file I created is a .c Isn't this not going to work
Does Visual Studio Express come with a recourse compiler (rc.exe)?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.