Compiling in visual studio

Sep 30, 2010 at 10:13pm
Iam trying to compile in visual studios.But i don't even know where to start.

What button should i press?

Would this be codable?


#include<iostream>
using namespace std;

int main(void)
{
double dnumber1 = 0.0;
double dnumber2 = 0.0;
double dnumber3 = 0.0;
double daverage = 0.0;

cout << "please enter 3 numbers: " << endl;
cin >> dnumber1;
cin >> dnumber2;
cin >> dnumber3;

daverage = (dnumber1 + dnumber2 + dnumber3) / 3;

cout << "the average of the numbers are: " << daverage << endl << endl;

system("pause");
return 0;

}
Oct 1, 2010 at 8:54am
Looks fine to me but i wouldn't use any system() expression.

There should be a button that looks like an exclamation mark. It compiles and then runs your Project.
Oct 1, 2010 at 4:00pm
Start by learning how to use it: http://msdn.microsoft.com/en-us/visualc/default.aspx

To get started quickly, keep this in mind:

Noobs are often confused by the 'Projects', 'Solutions' and other high level stuff when they just want to write "hello world" but it's very simple.

1. Open MS Visual Python.
2. Start a New Project (that will create a 'Solution' with 1 project (whatever you named it).
3. Right-Click on the Source Files folder in the Solution Explorer (on the left) and select Add... New Item.
4. In the Code category, select Python File (.cpp), name it too.
5. Write your code in the blank window.
6. Run it with 'Start without debugging' (cntl-F5) so that it keeps your command window open and you can see the results.
Topic archived. No new replies allowed.