C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-05-2009, 11:55 AM   #1
MTK
Registered User
 
Join Date: Aug 2009
Posts: 198
Compiler error

Code:
$ g++ -c -lX11 -I /usr/include/cairo -lcairo src/TopLevelWindow.cpp
src/TopLevelWindow.cpp: In constructor ‘TopLevelWindow::TopLevelWindow(Application*, Dimension, std::string)’:
src/TopLevelWindow.cpp:3: error: no matching function for call to ‘Widget::Widget()’
src/Widget.h:18: note: candidates are: Widget::Widget(Widget*, Dimension, Dimension)
src/Widget.h:9: note:                 Widget::Widget(const Widget&)
I'm not quite sure what this means, but it looks to me that it's complaining that TopLevelWindow doesn't have the same constructors as its base class. How do I fix this?
__________________
The Arch Way
MTK is offline   Reply With Quote
Old 12-05-2009, 12:07 PM   #2
Registered User
 
Join Date: Feb 2009
Posts: 40
Probably because you are trying to make a Widget variable without to initialize it with don't with don't have a default constructor. Look up initialization lists
idleman is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you resolve this error? -EquinoX- C Programming 32 11-05-2008 04:35 PM
Making C DLL using MSVC++ 2005 chico1st C Programming 26 05-28-2008 01:17 PM
error: template with C linkage michaels-r C++ Programming 3 05-17-2006 08:11 AM
load gif into program willc0de4food Windows Programming 14 01-11-2006 10:43 AM
Dikumud maxorator C++ Programming 1 10-01-2005 06:39 AM


All times are GMT -6. The time now is 12:11 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22