Saturday, August 13, 2011

C++ pointer referencing problem?

When you declare a ptr, you have to use a *. Say ptr * a, instead of ptr a. In your program, when you set a value to the array, you're actually setting a memory location, not a value, all because of that missing *.

No comments:

Post a Comment