no matching function for call to 'device::device()'
-
let me premise by sayin i'm learning c++ and qt at the same time so please forgive me if it's an obvious error but i haven't been able to understand why i'm having problems with this.
in main.ccp i usedevice dev;
class MainWindow;
// Class derived from stn_device, with required overrides.
//
class device : public stn::stn_device
{
public:
device(MainWindow* wnd);
bool is_sequence_finished()
{
return seq_finished;
}// a lot of stuff private: MainWindow* owner; bool seq_finished{}; int image_index(); }; in the stn_device header i have this declaration public: stn_device(); ///< Constructs the instance in default state. virtual ~stn_device(); ///< Releases all resources for device. stn_device& operator=(stn_device const&) = delete; stn_device(stn_device&& other) = delete; stn_device& operator=(stn_device&& other) = delete;
is this enough to understand the issue? thank you in advance
-
@wwwsharq said in no matching function for call to 'device::device()':
device dev;
If this is your code in
main.cpp
and below that your class code, then you need to call the correct constructor or implement the one you've used.
As the error message says, you don't have a default c'tor to match your call. You only have one implemented which expects aMainWindow
as argument.@Ronel_qtmaster said in no matching function for call to 'device::device()':
it seems that your class device does not have any constructor
"Not any" is not correct, but not the right one :)
-
@Ronel_qtmaster
oh i understood what i wasn't getting yeah idk why i did that, thanks!
onto the next mistake.... -