Hello!
a kovetkezo kod nem mux:
int count, i;
for (count = 0, i = 0; i < buf.use; i++)
if (buf.content[i] == 0xa)
count++;
ez viszont igen:
int count, i;
for (count = 0, i = 0; i < buf.use; i++) {
if (buf.content[i] == 0xa)
count++;
}
Az egyetlen kulonbseg a kapcsos zarojel, tehat a ket kod elmeletileg
egyenerteku (gcc is jo eredmenyt ad). Ja, a hibas mukodes: belep a
ciklusmagba egyszer, utana pedig tovabbmegy. Nem noveli 'i'-t sem.
Allat, mi?
Velemeny?
Szabi
|