i have written this program and made 3 constructors in the class and i want to call them in the main and i cant can any one help me and tell me how could i call them in the main
# include
using namespace std ;
class Triangle {
private :
float side1 ;
float side2 ;
float side3 ;
public :
Triangle () ;
Triangle (float , float , float ) ;
Triangle ( float[3] ) ;
float printAverage () ;
};
Triangle :: Triangle ()
{
float firstSide , secondSide , thirdSide ;
side1 = firstSide ;
side2 = secondSide ;
side3 = thirdSide ;
}
Triangle :: Triangle ( float firstSide , float secondSide , float thirdSide )
{
side1 = firstSide ;
side2 = secondSide ;
side3 = thirdSide ;
}
Triangle :: Triangle ( float side[3] )
{
side1 = side[0] ;
side2 = side[1] ;
side3 = side[2] ;
}
float Triangle::printAverage ()
{
return ( side1 + side2 + side3 ) / 3 ;
}
int main ()
{
float firstSide , secondSide , thirdSide ;
cout << "Enter First Side : " ;
cin >> firstSide ;
cout << "Enter Second Side : " ;
cin >> secondSide ;
cout << "Enter Third Side : " ;
cin >> thirdSide ;
Triangle tri1 = Triangle () ;
Triangle tri2 = Triangle () ;
Triangle tri3 = Triangle () ;
system("pause");
return 0;
}
Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error[error]Parse error: syntax error, unexpected $end in /home/klrbal/public_html/Mafia-test/tempfam.php on line
mysql UPDATE request not working and driving me crazy!!!
Hi,I have been stuck on this for ages.Quite simply I am trying to update my database with an update command:Code: $query="UPDATE `spence13_Portfolio`.`skillsList` SET `skillName` =
Database connection failure
Hello All,
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a new user when I'm not logged in. It should redirect me back to the login page but I get this
search function
HI guys,if anyone could point us in the right direction of how to do this, or provide some test code for a similar problem would be great!Basically, I have user profiles on my site, and I have a
Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not searching for the right thing. Here is what I want to do. I want to have a Text box which somebody
Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I want to change my web site pages in user's language without without google translater. Can
Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server. The way I want to achieve this is as follows: 1) I will have a page on my localhost server with a form
Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and timestamp is specified 10-11 am
Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of iframes ... it happened to another site , but that wasn't that important for me, but now it has