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;
}
Procedure with variable number of columns
Hi, I have a procedure that looks like this:
Get last modified date of web page
Hai All, In php how can i get last modified date of a give web page . I have tried to get last modified from the header but for some pages the server of that webpage doesn't returns lastmodified
SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself....Currently all user inputted strings go through this function;Code: function cleanQuery($string)
Session problem?!?
Hello All! I am very new to the php world but I am working on fixing things that a previous programmer screwed up for a site that I have. Let me explain what the current issue is. I believe it had to
need help modifying script
Hi guys,I'm fairly new to php and am having a bit of trouble modifying a script.This is the script:Code: <?php##############################################################################
grouping within a foreach?
hello all,I currently have a list of products spit out from my db via a foreach loop. Right now I am styling these as a <li>I want to style the list so that the annual and the monthly
Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for everything but Sundays. What I am trying to do is display all dates within a specified date range that
Word Trimming
Hi Guys & Gals!!Hope you are all ok....I need some help with the followingI need to trim the following word as follows:$word = 'James Bond';output would be 'James B'There is a space between
Format String help
I have a textbox where a person enters an application number. the application number is 10 characters in length:ex: 000012345A0256775434My clients only want to enter in the numbers without the
Google voice
I currently have a form in html, but I want it in php so the information is not in the source code.It all works and when you put in the name and number it will call. When you push the call button it