no, i also put i = 0, which solved the problem. hence my previous post. sorry to be unclear.
Type: Posts; User: aewofij
no, i also put i = 0, which solved the problem. hence my previous post. sorry to be unclear.
changed
while (to[i] = from[i] != '\0')
++ i;
to
while ((to[i] = from[i]) != '\0')
this is exactly what i was looking for. thank you.
(yeah, i'm just typing in random text. hopefully this counts as "lines of code.")
however, upon sending the EOF code to the above program,...
i see. however, how is it possible that i could have less than 1 character in the line? (or alternatively, just getting around this.)
if it means anything, i'm running in terminal.
i'm sorry, i have no idea how to word this. i'm learning c independently out of k&r on a mac. but there's a problem.
so, for example, a very simple program which prints the longest line and length...