| delorie.com/archives/browse.cgi | search |
| Date: | Tue, 27 Apr 1999 15:23:59 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | fiammy AT my-dejanews DOT com |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: I need help adressing characters in a string |
| In-Reply-To: | <7g439h$dk3$1@nnrp1.dejanews.com> |
| Message-ID: | <Pine.SUN.3.91.990427152054.9991B-100000@is> |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
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?
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |