I am getting a warning and a common error in my code, and I need help understanding them.
The warning is:[Warning] assignment makes pointer from integer without a cast
Here is the code that i get the warning from:
the left hand of the equals are all pointers to my bitset structure. The right hand side is a function i have written that returns a pointer to a bitset. MAX_STRING is defined as 256.
The error Im getting is: dereferencing pointer to incomplete type
And i get this error when i try to do something like:
Where 'size' is an int varible in the bitset struct. I want to access the size and items in my bitset. How can I do this? My bitset code is included below.
The warning is:[Warning] assignment makes pointer from integer without a cast
Here is the code that i get the warning from:
Code:
line1 = biset_new(MAX_STRING); line2 = bitset_new(MAX_STRING); bitset_un = bitset_new(MAX_STRING); bitset_in = bitset_new(MAX_STRING);
The error Im getting is: dereferencing pointer to incomplete type
And i get this error when i try to do something like:
Code:
bitset_un->size
Code:
struct bitset{
int size;
unsigned items[size];
};
Comment