Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] use of scanf

2005-06-23 by Dave Hylands

> An example call with scanf() to take just one character is
> char array_to_which_the_character_is_copied[some_length];
> scanf("%1c", array_to_which_the_character_is_copied[0]);

Actually, that should be (notice addition of &):

scanf("%1c", &array_to_which_the_character_is_copied[0]);

-- 
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.