Hello:
I think my 'C' code is correct, but Code::Blocks warns with:
"warning: cast from pointer to integer of different size"
First, the data setups.
Code:
struct soughtstrings {
char *sought_string;
char sought_string_data[100]; /* typical string */
int bypass_sought_string;
};
struct programdata {
int some_int;
long some_long;
struct soughtstrings ss[50]; /* no big whoop here */
};
Inside function:
Code:
scan_strings()
{
int i;
struct programdata pd; /* allocate the structure */
...
...
...
for (i = 0; i < 49; i++)
{
pd.ss[i].sought_string_data[0] = (char) " "; <<<WARNING HERE
}
}
Since all this is at the scope of struct programdata, I see no need for pointer dereferencing. Warning again:
warning: cast from pointer to integer of different size
I don't see any "pointer to integer". Do you? Where? I simply want to insert a space in "sought_string_data[]" array position 0.
Thanks!