What is the error message you are getting?
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]|
It's creating a pointer when I just want to multiply.
The error is on line 4, not on line 8.
..and that error would be?
how did you declare shape?
void Area(int shape){
float width;
float solution;
if(shape == "square"){
cout << "Enter side length: " << endl;
cin >> width;
cout << endl;
solution = width * width;
cout << "Area = " << solution << endl;
}
}
Whole function, sorry.
void Area(int shape) what about string shape?
Int can't be "square" or so,it's string..
and there you have it
comparing two different data types.
int
string
choose one type for both my friend.