Results 1 to 1 of 1
For example, if I have a void pointer *p
If I need to convert it into a pointer which point to a array or struct first and then increase.
When ...
- 01-30-2011 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 5
the type forced variable can't increase with ++???
For example, if I have a void pointer *p
If I need to convert it into a pointer which point to a array or struct first and then increase.
When I coded like this:
((struct test_st *)p)++; OR (struct test_st *)p += 1;
there is an error when the code was compiled as:
error: lvalue required as increment operand
error: lvalue required as left operand of assignment
Couldn't I do it as above? Why?


Reply With Quote