Nov 24, 2016 at 8:54am
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.
Nov 24, 2016 at 10:10am
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 Nov 24, 2016 at 10:12am
Nov 24, 2016 at 10:22am
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 Nov 24, 2016 at 10:23am
Nov 24, 2016 at 10:43am
oh yeah i didn't think of that, thanks