Thread: Here's another one...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Lightbulb Here's another one...

    This is probably so simple it's not funny, but you never know.
    Code:
    int varible = 0;
     
    int main(void)
    {
       hello fellow programmer
    }
    Make the code in the main function add one to the varible varible, without adding anything to main or using classes or structs.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >This is probably so simple it's not funny
    Yes, yes it is. It's also pretty pointless seeing as how you won't learn anything significant from solving the puzzle.
    My best code is written with the delete key.

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Lighten up, we are in the General Discussions board, not everything you learn here has to be significant. And if it's so easy, then why not solve this "pointless puzzle"?

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Lighten up, we are in the General Discussions board, not everything you learn here has to be significant
    I was simply stating an observation. There's no need to get defensive.

    >And if it's so easy, then why not solve this "pointless puzzle"?
    For the same reason that I don't participate in contests that I'm overqualified for. If I throw together a solution in a few seconds then it sucks the fun right out of the exercise for the people who are actually interested in figuring it out.
    My best code is written with the delete key.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    There is very little interesting about this exercise actually. I prefer puzzles that actually can be used in real-life situations (and are more challenging that just mimic language features). This one is pointless.

    But still...

    Code:
    #define hello varible
    #define fellow +=
    #define programmer 1;
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    >> I was simply stating an observation. There's no need to get defensive.

    Oh.

    It's just that where I come from (my family), no one makes an observation, it's always an aggresive comment, so I am automaticly always in defense mode.

  7. #7
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    >> This one is pointless.

    I guess it is.

    Oh well, maybe my other thread isn't...

  8. #8
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Heh, my family too

    I think I'll copy your poll idea in relation to my signature.

  9. #9
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    >> Heh, my family too

    Well, it's always good to know I'm not alone.

  10. #10
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >It's just that where I come from (my family), no one makes an observation, it's always an aggresive comment
    Hmm, my family is just super competitive about everything. Holidays together are always entertaining.
    My best code is written with the delete key.

  11. #11
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Especially siblings. Take from me, I know, I've got 4 bubs (little brothers)!
    Last edited by Queatrix; 09-17-2006 at 06:56 PM.

  12. #12
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Heh, I've 5 older brothers and sisters I guess I was the brat hehe

  13. #13
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I'm the only man in my house. Even the damn cat is a she. My wife and daughter... well, in short, Electra never had a saying.

    ... so I take it on the forums
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #14
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I can relate to Mario's feelings. I'm the only male in this generation of my family. I'm lonely.

  15. #15
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    I've got a little brother.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed