• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scanf...?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scanf...?


  • Subject: Re: scanf...?
  • From: Ondra Cada <email@hidden>
  • Date: Mon, 10 Apr 2006 01:40:35 +0200

Jonathan,

On 10.4.2006, at 0:59, Jonathan 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.

(i) consider whether it truly is reasonable to learn CLI stdlib these days: you know, it's not seventies, XXth century anymore;
(ii) if the answer is still "yes" for some strange reason, replace those nice double quotes -- “” -- by plain ones, " :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ 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>)

  • Prev by Date: NSTreeController and setSelectionIndexPaths
  • Next by Date: Re: NSTreeController and setSelectionIndexPaths
  • Previous by thread: Re: scanf...?
  • Next by thread: Re: scanf...?
  • Index(es):
    • Date
    • Thread