   Strange class problems in DevCpp
  I am making a gui and one of my classes is titled CWindow. In this class its giving me an error that saysIn constructor ''CWindow::CWindow()''no matching function for call to ''CObject::CObject()''candidates are ''CObject::CObject(const CObject&) CObject::CObject(int,int)I was wondering if this has anything to do with the name. I doesn''t happen with any of my other classes. 
  Your class doesn't have a constructor that takes no arguments. The compiler doesn't add the default constructor as soon as you add your own.You could also tell it which constructor you want to use, i.e.:CWindow::CWindow(): object(5, 6) {  . . . }   [edited by - smart_idiot on February 15, 2004 1:13:37 AM];  I only have one constructor for the class currently, and it doesn''t take any arguments. And I was a bit confused by the object(5, 6) line. What are 5 and 6 referring to? Is object used just like that, or is it the name or a class/object etc? I am pretty bad at OOP, so forgive me if I sound dumb. Thanks for the reply. ;  wow, i am an idiot! I just figured out the problem. (Bangs his head repeatedly against wall for wasting hours on dumb problem)I had another class, which I didn''t realize, CObject (I thought it was something wierd because the error was from CWindow, but thats just were I included it from) Its exactly what you said, just in a different file. ;  In my example. . .According to your compiler error, CObject's constructor takes two arguments. I assume the other constructor was created by the compiler. Anyway, assuming you CWindow class has a CObject named object, it would call object's constructor with 5 and 6 as arguments when the CWindow object is created. This way it can put the object together right the first time, no need to start with a default object and then assign values to it.Much shorter and nicer example: class foo {  public:   int bar, baz;   foo(): bar(5), baz(7)    {// bar is set to 5, baz is set to 7. No need to set anything.    } }; [edited by - smart_idiot on February 15, 2004 1:35:04 AM];  Thanks alot for your help! 