D
Default User
Bill said:I've never come across a decent C tutorial. K&r2 isn't it. Besides IThen explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?
can't remember the day sometimes, let alone function parameters.
You open K&R, you go to Appendix B (Standard Library) and look at
section B.1.3 (Formatted Input) where you find:
int sscanf(const char *s, const char *format, ...)
sscanf(s, ...) is equivalent to scanf(...) except that the input
characters are taken from the string s.
You can also refer to section 7.4 of the main text, where they have an
extensive explanation of scanf().
That's why
I take aricept. I don't have alzheimers but my thinking processes are
confused by dysthymia and Major depressive disorders.
If you are truely handicapped, I don't want to pick on you, but this
whole thing just seems funky to me.
I have the intellect. But my learning is hindered. And I've always used
vod as the only parameter to main, up til now.
Section 5.10 has a very good explanation of how command-line arguments
work including a nice diagram of the argv[] array and several examples
of how to use the values.
I find it hard to believe that you could look at K&R and get nothing
from it. The going may be slow at first, but the information is there
and in a well-presented manner. Reading each chapter and working the
problems should get you going.
Brian Rodenborn