Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Iteration in C

Name: Anonymous 2010-06-14 3:53

Hi there /prog/.

I know Python, and I'm learning C. Both langs have for loops. Python's nicely iterates over a collection of unknown length. C's usually has you specify the length of the collection at compile time, but what if the length is unknown?

My best newbie guess: you terminate the collection with NULL, or you write an iteration function that returns some end-of-collection value when it's done.

Name: Anonymous 2010-06-15 2:32

>>41
Hate to tell you this, >>26,29,32, but you're the only person who thinks you made anything resembling a point there. Might have gone better if you'd said ``char buffers'' in >>26 instead of hoping people would read your mind in a discussion about int arrays, and if you hadn't tried to bullshit about alignment.
>>33 and >>34 don't have anything to be ashamed of.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List