I just have a couple questions concerning classes.
1. Can you have multiple classes in one file? as in #ifndef...#endif then another #ifndef...
2. does the file name have to be the same as the class name? aka circle.h and the file has to be circle?
3. Do classes only handle data? Can the member functions cout stuff to the screen and get input?
4.What exactly does a constructor do? Like lets say you want to house a constructor for a house, would you have to set all the variables there to zero
5. Can someone please explain to me what this "copy constructor" does because I have no clue on thatCode:public:
house();
private:
float doors, windows, rooms;
house::house()
{
doors=0;
windows=0;
rooms=0;
}
Tell me if you need the entire coding for the copy constructor but yea thanks for reading all my questionsCode:public:
circle();
circle(const circle &);<-copy constructor
private:
....
circle::circle(const circle & Object)<-Dont know what object exactly does
{
radius=object.radius;
}