discuss-gnustep
[Top][All Lists]
Advanced

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

Re: scanf does not properly pass characters


From: Markus Hitter
Subject: Re: scanf does not properly pass characters
Date: Sat, 25 Jan 2014 16:52:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Am 25.01.2014 15:46, schrieb igorland:
>       char nameC[50];
>       NSLog(@"ENter your name: ");
>       scanf("%c", &nameC);
>       NSLog(@"Name is: %c", nameC);

%c formatting stands for a single character, not a string. Just the same
as in plain C.


Markus

-- 
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.reprap-diy.com/
http://www.jump-ing.de/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]