I am new to programming with C and visual studio. When I open a .c file with visual studio 2005, can any tell me how I actually compile it? Also, can anyone tell me why the "Start Debugging" option is grayed out?
I am new to programming with C and visual studio. When I open a .c file with visual studio 2005, can any tell me how I actually compile it? Also, can anyone tell me why the "Start Debugging" option is grayed out?
i dont have access to VS right now, but i thought the "Compile" option was in some menu at the top, like "Project". if the debug option is disabled, i imagine any building/compiling options are also disabled.
i think VS requires you to make a project, even an "Empty Project". after that, add your files to the project and look for the options again, which should be enabled.
Ok, i created a new empty project, opened my .c file, and went to Build Project. Then I received this error: 'Sub Main' was not found in 'Project1'.
Here is my code:
Code:#include <stdio.h> int main( void ) { printf( "Test\n"); return 0; }
> 'Sub Main' was not found in 'Project1'.
sub main sounds more like you created a VisualBasic project, not a C++ project.
You need to start with a C++ console project
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
HOPE YOU UNDERSTAND.......
By associating with wise people you will become wise yourself
It's fine to celebrate success but it is more important to heed the lessons of failure
We've got to put a lot of money into changing behavior
PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
IDE- Microsoft Visual Studio 2008 Express Edition