A89: Re: Re: Re: Re: A C question


[Prev][Next][Index][Thread]

A89: Re: Re: Re: Re: A C question




Hi!

| Huh, what you are doing!!? There is no any space allocated for your
| "string" variable: this will cause a crash!!! You need to do:
|
| char string[50];

10 should be enough in this case, instead of 50.  Functions in ROM are 8
characters at a maximum, plus the '(', plus the terminating null character.
I guess.

| char *string="";

Just out of curiosity, wouldn't

char *string="         ";  // 9 spaces

work?

Bye,
Sebastian




Follow-Ups: References: