|
-
March 18th, 2009, 11:04 PM
#1
Help with Classes
Im wondering on how i would display the "area" in main?
#include <iostream>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
class Circle
{ private:
double radius;
public:
void setRadius (double r)
{radius=r;}
double getArea()
{return 3.14*pow(radius,2);}
int main () {
return 0;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|