Constructor called when we create class object.Object are base of c++.
your 1 include is having problem,remove #include <Windows.h>.
Tester test();
should be replace with Tester test;//here we are creating object.
i see, thanks.
kinda wired the compiler doesn't just assume that im making a object with 0 arguments but whatever lol
Last edited on
But how then could the compiler know if you were declaring a function test() that returns a Tester object?
There's already an unambiguous way to define an object using the default constructor:
Tester test;
It's only sensible that the unambiguous way to declare a function that takes no arguments and returns a Tester object should be:
Tester test();
"Whatever" is rarely a helpful response to a problem you don't understand.
Last edited on
oh yeah i didn't think of that, thanks