prev up next   top/contents search

comp.lang.c FAQ list · Question 12.12

Q: Why doesn't the call scanf("%d", i) work?

A: The arguments you pass to scanf must always be pointers: for each value converted, scanf ``returns'' it by filling in one of the locations you've passed pointers to. (See also question 20.1.) To fix the fragment above, change it to scanf("%d", &i) .

prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North