I'm a C programmer and I just installed VC++, created a new project called test1, and started typing in code. I decided to make a real simple program that has some input and output so I can see how VC++ works but after I create my project and type in my code, I do not know where to go from there. I decided to debug since that is the first thing I do with all my other compilers, then compile and build but it cannot find test1.exe in the debug section. I then built it to see if that would work and it didn't. I'm quite confused with the steps I need to take after code is actually written to get a working executable file.
Thanks in advance.

New to VC++, can't really get started...
Manikandan S
This looks really weird. When you rebuild do you see a line like:
1>LINK : D:\Projects\VS2005\cvxcvxcv\Debug\cvxcvxcv.exe not found or not built by the last incremental link; performing full link
TroyB
When you say you built it to see if that would work and it didn't what's the reason for it did not work, some compiler errors Can you tell us some more details
David_52
EmmaTaylor01
------ Rebuild All started: Project: hello world, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'hello world', configuration 'Debug|Win32'
hello world - up-to-date
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
"
razer311
e-mhigz
"
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
"
Rebuilding does something similar but with 1 succeeded.
Then when I go to debug, (Debug->Start Debugging) it says:
"
Unable to start program 'C:\the file's path'.
The system cannot find the file specified.
"
I'm not really sure what to do.
Jgk23
OK. It's not enough to have that file in the project directory. It must be added to the project. In the Solution Explorer (if you can't find it go to the View menu and click the Solution Explorer item) right click the project node ("hello world") and click. You'll find there an Add option with a submenu that has an Add Existing option. Click that and now you can add your file.
What I cannot understand is why you don't have any source files in the project. All projects create by VC++ have at least a file containing entry point of the program (main, WinMain...). What project type did you used
Frapazoid
Hi there,
I think all you need to do is some custom settings in your VC++ Although I trust that you must have taken care of all this before begining still may be sometimes we forget.
open your project
go to project setting
Debug tab and customize your settings there.
Hope this works for you.
OnCallBI-DBA
The Dwarf
I got it to work so I put a few small programs I made in the past in there and when I build it with VC++, it says things (that obviously work) are corrupted, which just can't be right. Like this code:
// Y-Intercept, Slope, And Basic Equation Calculator
#include <stdio.h>
#include <conio.h>
int main() {
float y_int, m, x_int, y2, y1, x2, x1; // basic floating point variables. m is slope etc.
char quit; // takes a single letter if you don't want to quit, explained later.
do {
printf("Enter in your first set of coordinates (x1, y1)\nPlease omit commas and parenthesis: ");
scanf("%f", &x1);
scanf("%f", &y1);
printf("\n\n");
printf("Enter in your second set of coordinates (x2, y2)\nPlease omit commas and parenthesis: ");
scanf("%f", &x2);
scanf("%f", &y2);
printf("\n\n");
// CALCULATIONS:
m = ( y2 - y1 ) / ( x2 - x1 ); // SLOPE
y_int = y1 - (m * x1); // Y_INTERCEPT
x_int = -y_int / m; // X_INTERCEPT
// DISPLAYS YOUR CALCULATIONS
printf("Your slope is %.1f.\nYour y intercept is [0, %.1f].\nYour x intercept is [%.3f, 0].\n", m, y_int, x_int);
// %.0f means that it will display the respective floating point number "0" places after the decimal
//I do this because if the y-intercept were negative, then it would diplay something like y=2x+-3
if (y_int > 0) printf("\nYour slope-intercept equation is: y=%.1fx+%.1f\n\n\n", m, y_int);
else printf("\nYour slope-intercept equation is: y=%.1fx%.1f\n\n\n", m, y_int);
// Back to the DO loop up there. If you type N or n, it will go back and restart. If not, it quits. Simple as that!
printf("Do you want to quit (y/n) ");
scanf("%s", &quit);
printf("\n\n\n\n");
} while (quit == 'N' || quit == 'n');
return 0;
}
It says: Run-Time Check Failure #2 - Stack around the variable 'quit' was corrupted.
I got similar errors with different programs that I've made. Is it having problems with my scanf, or what
2) Second Problem
I've gotten kind of spoiled with the clrscr(); command, is there a way to use that command with VC++
KIRANKU
1) Presumably the compiler is complaining because you are scanning a string into a character
'scanf("%s",&quit);'
Which is bad as you will overwrite the memory after quit with a null character if they only type in one character, and a bunch more characters if they type more than that. Instead you should be using %c, ie 'scanf("%c",&quit)' to write only to the character's piece of memory. This would be a good example of where the checks in visual studio are protecting you from hacking attempts (a buffer overflow in this case).
2) You could probably use "system("cls")" although I'll admit this is inelegant. If you're willing to use .Net, you could do a Console.Clear().