Suppose I have a class
class C { C(int a=10); }; why if I call
C c; the contructor C(int =10) is called and if I call
C c(); the default constructor is called? How to avoid this? I want to execute only my constructor, I tried to make the default constructor private, but it doesn't work.
warning C4930: 'C c(void)': prototyped function not called (was a variable definition intended?)I know other compilers will as well, but the ones I have readily available at the moment don't.