class A
{
private:
B b(5);
};
From what I understand I cannot initialize b in the header. I could use a pointer to b and initialize it in the .cpp file, but I really don't need b outside the scope of this class. I could always create a temporary b object in the .cpp and override the equals operator, but is there another way to do this? Can you initialize objects in header files?

New Topic/Question
Reply



MultiQuote





|