Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need an explanation

Status
Not open for further replies.

RSTR

Programmer
Mar 25, 2000
27
US
Could someone please tell me what this means?:

error C2040: 'Status' : 'int (void)' differs in levels of indirection from 'int'

Thankyou
-RSTR



benthecat@hotmail.com

 
Are you trying to use the extern keyword? If so this probably means that one of your declarations is a pointer and the other one isn't.

somefile.h

int *number;

anotherfile.cpp

extern int number; //wrong
extern int *number; //right

This may also apply to a function. I just had this exact same error a few minutes ago and that's what fixed it.
 
that's the thing, though, I'm not using any pointers at all.
just variables.

I have a class set up in a header file, and all I did was include it in a cpp file, and it didn't.
benthecat@hotmail.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top