EDN Admin
Well-known member
<pre lang="x-cpp
/* FeetToMeters.cpp : Demonstrates a conversion program that uses a
decimal point value
*/
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
// Define the variables
double f; // holds the value of "feet"
double m; // holds the value of "meters"
// Get the lenfth to calculate from the user
cout << "Enter The value in Feet: ";
cin >> f;
cout << "n"; // new line
// Convert to meters using the formula
m = f / 3.28; // This is the formula
cout << f << " Feet Is Equal To " << m << " metersn";
return 0;
}
[/code]
Ok.. so I decide to start learning some inteligence <c++> and start in Visual C++ latest down load, get the turorials suggested which are great and get cracking at it.
After the fourth lesson I get the following build error
<span style="font-size: xx-small;
c
rogram filesmicrosoft visual studio 9.0vcincludeistream(13) : error C2143: syntax error : missing ; before namespace
the only difference with the various lesson projects I have been working on is the actual code
int main()
{
code.....
code...
return 0
}
after typing the attached code I am unable to build all previous project lessons, I did the whole reboot thing and still the same problem?
View the full article
/* FeetToMeters.cpp : Demonstrates a conversion program that uses a
decimal point value
*/
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
// Define the variables
double f; // holds the value of "feet"
double m; // holds the value of "meters"
// Get the lenfth to calculate from the user
cout << "Enter The value in Feet: ";
cin >> f;
cout << "n"; // new line
// Convert to meters using the formula
m = f / 3.28; // This is the formula
cout << f << " Feet Is Equal To " << m << " metersn";
return 0;
}
[/code]
Ok.. so I decide to start learning some inteligence <c++> and start in Visual C++ latest down load, get the turorials suggested which are great and get cracking at it.
After the fourth lesson I get the following build error
<span style="font-size: xx-small;
c

the only difference with the various lesson projects I have been working on is the actual code
int main()
{
code.....
code...
return 0
}
after typing the attached code I am unable to build all previous project lessons, I did the whole reboot thing and still the same problem?
View the full article