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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiler error "Different levels of indirection"

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
0
0
Could somebody please explain what this message means?

I have looked at the microsoft site, but it has helped little.




James Goodman
 
"a mismatch of the levels of indirection" could they be more cryptic? anyway, this error message means that the compiler found a pointer problem between variables in 1) an assignment statement, 2) a function's call and declaration, or 3) a comparison statement
you can create the error with something like this

int intNumber;
int *intNewNumber;

intNewNumber = intNumber;

In this case, I really want to save the address of a memory area which contains a Number value.
To fix this error put a "&" in front of intNumber in the assignment statement.

intNewNumber = &intNumber;

the advantage, or disadvantage, is that if I change intNumber, intNewNumer is also changed
hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top