Mail Archives: djgpp/1999/04/27/08:26:16
On Tue, 27 Apr 1999 fiammy AT my-dejanews DOT com wrote:
> char *string;
>
> void main (void)
> {
> int i;
> for (i=; i=lengthof(string); i++)
> {
> dosomething with string[i];
> }
This is okay, except for some minor problems:
char string[100];
int main (void)
{
int i;
for (i = 0; i < sizeof (string) - 1; i++)
{
do_something_with (string[i]);
}
}
> I can't do that, the compiler gives me an error.
What error message(s) did you see, what source (exactly) did you try to
compile, and what command line did you use to compile it?
- Raw text -