Re: scanf...?
Re: scanf...?
- Subject: Re: scanf...?
- From: Greg Herlihy <email@hidden>
- Date: Sun, 09 Apr 2006 16:17:40 -0700
- Thread-topic: scanf...?
The apostrophes that surround the %s string in the scanf() call are
curly-quotes and not ASCII apostrophes. The call to scanf should be:
scanf("%s", &me);
Greg
On 4/9/06 3:59 PM, "Jonathan" <email@hidden> wrote:
> Ok. So I'm going through my beginning C book, and come across some code that
> wont compile in XCode no matter what I do:
>
> #include <stdio.h>
>
> int main()
> {
> char me[20];
> printf("%s", "What is your name?");
> scanf(³%s²,&me);
> return 0;
> }
>
>
> I get 7 errors on this one. When I remove the scanf, it runs fine.
>
> Best,
> Jonathan
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >scanf...? (From: Jonathan <email@hidden>) |