Problem with declaring constructor in VS 2010

Jul 21, 2011 at 2:42pm
Hey,
I am getting the following error: "missing type specifier-int assumed.Note:C++ does not support default-int" for this line of code in Visual Studio 2010:
 
CTSABlock(CWnd* pParent = NULL);

Don't understand why I am getting this error. I don't get this in Visual Studio 6.0.
Any help will be appreciated!!
Thanks In Advance!!
Jul 21, 2011 at 2:55pm
closed account (z05DSL3A)
You are probably going to have to give more details, that bit of code is not enough.
Jul 21, 2011 at 4:32pm
It sounds like you're not specifying a return type for the function
Jul 21, 2011 at 4:56pm
Warnis,
To my understanding a constructor doesn't have a return type. Is this correct?
Jul 21, 2011 at 4:59pm
Indeed, constructors do not have return types.
It's just that I got that exact same error previously today and it was because I was not specifying a type for a couple of my functions. If this is a constructor we are going to need more code like Grey Wolf said.
Jul 21, 2011 at 6:46pm
closed account (zb0S216C)
Maybe you got your constructors identifier wrong? It's always a possibility.

Wazzak
Topic archived. No new replies allowed.