Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22

Thread: It's Alive!

  1. #21
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Destiny Islands
    Rep Power


    It's funny; when doing C/C++, I use structs for classes that store more data (and are mostly get/set methods) than have functions. Classes are used for more objects that have methods outside of get and set. Interesting differences from different programmers; the lesson here is that there is no one way to program!

  2. #22
    Singing Boyo is offline Senior Member
    Join Date
    Mar 2009
    Rep Power


    That's what I was saying. Probably just a leftover from C, where structs could only hold data and function pointers (which are weird).

    Reread my post, and noticed it needs clarification. With JAVA, I would have a prepareBuild method in a Resources class. With C++, it'd be in the city class, because resources would be a struct and wouldn't have methods (usually just a constructor and a few operators in structs for me).
    If the above doesn't make sense to you, ignore it, but remember it - might be useful!
    And if you just randomly taught yourself to program, well... you're just like me!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Keep my TCP connection alive
    By eggmanpete in forum Advanced Java
    Replies: 4
    Last Post: 03-02-2009, 07:11 AM
  2. How to configure "keep alive" in Sockets?
    By rajdotme in forum Networking
    Replies: 1
    Last Post: 04-17-2008, 12:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts