not sure though. I have a premade test program my teacher made, and I'm trying to run it with bcc32.exe.........
I keep getting these errors...
Code:
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
C:\Borland\BCC55\Bin\bobdole.cpp:
Error E2209 C:\Borland\BCC55\Bin\bobdole.cpp 5: Unable to open include file 'iostream'
Error E2282 C:\Borland\BCC55\Bin\bobdole.cpp 7: Namespace name expected
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 19: Undefined symbol 'cout' in function Watertank::displayData()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 19: Undefined symbol 'endl' in function Watertank::displayData()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 25: Undefined symbol 'cout' in function Watertank::getData()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 26: Undefined symbol 'cin' in function Watertank::getData()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 35: Undefined symbol 'cout' in function Watertank::getArea()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 35: Undefined symbol 'endl' in function Watertank::getArea()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 40: Undefined symbol 'cout' in function Watertank::getGallons()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 40: Undefined symbol 'endl' in function Watertank::getGallons()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 46: Undefined symbol 'cout' in function main()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 46: Undefined symbol 'endl' in function main()
Error E2451 C:\Borland\BCC55\Bin\bobdole.cpp 52: Undefined symbol 'cin' in function main()
*** 13 errors in Compile ***
Tool completed with exit code 1
anyone have any advice or any information on what is going wrong?
Code:
/* ================================================================== */
/* > Program: tank1.cpp < */
/* > Description: OPP and simple classes < */
/* ================================================================== */
#include <iostream>
using namespace std;
#define TITLE "Watertanks"
#define PI 3.14
class Watertank
{
private:
float radius, height, area, gallons, cover;
public:
void displayData()
{
cout << "\nThe watertank has a radius of " << radius << endl;
cout << "The watertank has a height of " << height << endl;
cout << "The paint coverage is " << cover << endl;
}
void getData()
{
cout << "Enter tank radius in feet: ";
cin >> radius;
cout << "Enter tank height in feet: ";
cin >> height;
cout << "Enter the paint coverage: ";
cin >> cover;
}
void getArea()
{
area = 2 * PI * radius * (radius + height);
cout << "The surface area is " << area << endl;
}
void getGallons()
{
gallons = area / cover;
cout << "The paint gallons needed are " << gallons << endl;
}
};
main()
{
Watertank tank;
cout << TITLE << endl << endl;
tank.getData();
tank.displayData();
tank.getArea();
tank.getGallons();
cout << "\nPress ENTER to continue " << endl;
cin.ignore();
cin.get();
return 0;
}