As the title says, more or less. I'm just trying to make a program basically (Variable) + (Variable) = (Total)
Here is the script:
// Variable + Variable = Total.cpp : main project file.
#include "stdafx.h"
using namespace System;
void main()
{
float num1;
float num2;
float total;
cout<<"enter a value for the first variable:";
cin>> num1;
cout<<"enter a value for the second variable:";
cin>> num2;
total = num1 + num2;
cout<<"The sum of the numbers =" << total;
}
I think that #include "stdafx.h" is a template from the IDE that I'm using (Microsoft Visual C++ 2008 Express Edition)
Here is the error that I get when I try to compile it...:
------ Build started: Project: Variable + Variable = Total, Configuration: Debug Win32 ------
Compiling...
Variable + Variable = Total.cpp
.\Variable + Variable = Total.cpp(13) : error C2065: 'cout' : undeclared identifier
.\Variable + Variable = Total.cpp(14) : error C2065: 'cin' : undeclared identifier
.\Variable + Variable = Total.cpp(15) : error C2065: 'cout' : undeclared identifier
.\Variable + Variable = Total.cpp(16) : error C2065: 'cin' : undeclared identifier
.\Variable + Variable = Total.cpp(20) : error C2065: 'cout' : undeclared identifier
Build log was saved at "file://c:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\Variable + Variable = Total\Variable + Variable = Total\Debug\BuildLog.htm"
Variable + Variable = Total - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any help is appreciated, again take into account that I really don't have any clue what I'm doing, This is like my first week or so in CPP, so bare with me.