Question 12.15

How can I specify a variable width in a scanf format string?


You can't; an asterisk in a scanf format string means to suppress assignment. You may be able to use ANSI stringizing and string concatenation to accomplish about the same thing, or to construct a scanf format string on-the-fly.


Read sequentially: prev next up top


This page by Steve Summit // Copyright 1995 // mail feedback