Hausemaster: In programming, sooner or later,
everyone finds themselves stuck for hours or days or weeks on something which turns out to be really simple in the end. IMO, you're not a real programmer until you've experienced that at least once.
I know a good kernel dev who has said "I am stupid" more than once over this sort of thing. Eventually, I think you learn tricks to get around the block, much like professional writers (or long-form webcomicers ) learn how to get around writers block.
I do think you have made a mistake: Someone told you to use an if condition, and you replied, "I don't know how to do that."
Yeah, right! I'm certain you do know how to do it because you can write C++ and assembler. There are no if conditions in hello world, but any program of any interest at all has them, so I
know you know how to know them! (In assembler, the equivalent is conditional jumps.) I think other forum posters were much too quick to tell you this is too hard for you instead of thinking about what you said you could do.
*glares at certain other forum posters*
I totally get that amazing payoff feeling when you succeed at programming.