I am creating a program that will calculate the size of a circular container. i am getting the following error error "C4430: missing type specifier - int assumed. Note: C++ does not support default-int". I am very new to c++ and im not sure what i did wrong. everything appears to me to be correct in this header file. any help someone more knowledgable can provide would be appreciated...
First of all in your class you should list void print(); so that you're more correct. I also don't see a definition of void circleType::print(). That might be your problem. Everything else seems correct unless the error is in your main() function.
The phaonmeal pweor of the hmuan mnid aoccdrnig to a rscheearch at
cmabrigde uinervtisy, it deosn't mttaer in waht oredr the ltteers in,
Jsut taht the frist and lsat leettr are in the rgiht spot.
the rset can be a taotl mses and you can sitll raed it wouthit a porbelm.
Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef,
but the wrod as a wolhe.
#include <iostream>
#include "cylinderType.h"
usingnamespace std;
int main()
{
double radius;
double height;
double costPerLiter;
double paintCost;
cout << "Welcome to the shipping and painting calculator!" << endl;
cout << "Please enter the radius of the base of the container in feet: ";
cin >> radius;
cout << "Thank you" << endl;
cout << "Next, please enter the height of the container in feet: ";
cin >> height;
cout << "Thank you" << endl;
cout << "Next, please enter the shipping cost per liter: ";
cin >> costPerLiter;
cout << "Thank you" << endl;
cout << "Next, please enter the paint cost per square foot: ";
cin >> paintCost;
cout << "Total Shipping Cost :$" << cylinder.volume() * 28.32 * costPerLiter << endl;
cout << "Total Paint Cost :$" << cylinder.area() * 28.32 * paintCost << endl;
system( "pause" );
return 0;
}
I am getting the error that cylinder has not been declared (lines 31-33). I am referencing the cylinder class and the functions volume and area? so i do not need to declare it as a variable right? this is my cylinder header file. (volume and area are on lines 47-55)