- #1
martix
- 169
- 5
There something really fishy going on here and I can't put my finger on it...
Here is the situation in condensed form:
What I know - indexing is also a form of memory manipulation, so it should work. And (*b).el == b->el. Btw first option gives me an automatic menu for choosing between the elements, no such luck with the second one.
Help!
Here is the situation in condensed form:
Code:
WordSt **stpt, *starr; //stpt - pointer to start of array; starr - array of pointers to the structs
...
stpt=malloc(count*sizeof(starr*)); //syntax error : ')' - what's with that anyway?
...
starr[wz]=malloc(sizeof(WordSt)+len*sizeof(char)); //C2679: binary '=' : no operator found which takes a right-hand operand of type 'void *' (or there is no acceptable conversion) Trying to convert it doesn't cut it either...
starr[wz]->len=len; //Says it need '.' When I put '.'(as in (*starr[wz]).len) it says "illegal indirection". Also any version with -> doesn't work
Help!
Last edited: