Stop Microsoft
Miscellaneous => Programming & Networking => Topic started by: Stryker on 1 July 2003, 14:00
-
I'm having a problem with this:
It gives the output:
I think there is a problem with my while statement. I did it with for just fine, I'm just thinking I can do it with while too.
I probably look stupid, but I'm trying to brush up on some C skills.
[ July 01, 2003: Message edited by: Stryker ]
-
bah, nm i was being stupid. it's 2am though. what do you expect?
You can't program at 2am without pizza and beer.
-
you can't do anything at 2am without pizza and beer
-
Actually, I find ET to be extremely easy even without beer and pizza... however, I need vast amounts of drugs at 2 am in the morning
-
quote:
while (x=0,x!=argc,x++)
The commas are the problem: these should be semi's.
____________________________________
Live Free or Die: Linux
(http://www.otakupc.com/etsig/dolphin.gif)
"There: now you'll never have to look at those dirty Windows anymore"
--Daffy Duck
-
quote:
Originally posted by jtpenrod:
The commas are the problem: these should be semi's.
That's correct for the for() function. I figured it all out, I was using while() way wrong. Now to figure out how to take some chars out of a string and use them.
char *buf1="abcdefg";
how do we make buf2="cdef"?
-
strncpy(buf2, buf1 + 2, 4);