1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

Trying to learn a new language

Discussion in 'UO Siege Perilous' started by Tigsalot, Oct 14, 2008.

  1. Tigsalot

    Tigsalot Journeyman
    Stratics Veteran Stratics Legend

    Joined:
    May 25, 2001
    Messages:
    294
    Likes Received:
    2
    C++ is a ***** :cursing::grrr: :(
     
  2. Vortex

    Vortex Slightly Crazed
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    1,470
    Likes Received:
    5
    Just curious, why C++ instead of C#..?
     
  3. Tigsalot

    Tigsalot Journeyman
    Stratics Veteran Stratics Legend

    Joined:
    May 25, 2001
    Messages:
    294
    Likes Received:
    2
    same difference it's all frustrating!!!!! lol
     
  4. Sweeney

    Sweeney Guest

    It's easy if you learn C first(which is incredibly simple). C++ is just a few new additions that don't take too long to learn.

    I taught myself C by studying MUD code, and got 100% on every C++ test I took. Then again I'm a geek who only studied MUD code to learn exploits.
     
  5. Tigsalot

    Tigsalot Journeyman
    Stratics Veteran Stratics Legend

    Joined:
    May 25, 2001
    Messages:
    294
    Likes Received:
    2
    well, I just started 2 hours ago. Lots of youtube videos and read a couple of chapters online for beginners
     
  6. Vortex

    Vortex Slightly Crazed
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    1,470
    Likes Received:
    5
    I found C# to be much easier for what its worth..
     
  7. Sweeney

    Sweeney Guest

    Damn man, you can't learn C++ from YouTube. Not sure what you're learning it for, but the best tips I have for beginners are:
    Study lots of code. Don't memorize it just learn to think how the language works. Once you have that down, it's almost all a piece of cake.
    Use parentheses for EVERY math operation to force precedence. Probably a bad habit from the pre-ansi days but it works and makes it clear.
     
  8. Czarina

    Czarina Slightly Crazed
    Stratics Veteran

    Joined:
    May 15, 2008
    Messages:
    1,274
    Likes Received:
    26
    and i just learned how to empty my recycle bin......
     
  9. Tigsalot

    Tigsalot Journeyman
    Stratics Veteran Stratics Legend

    Joined:
    May 25, 2001
    Messages:
    294
    Likes Received:
    2
    well, my friend is trying to help out and gave me this problem: 45 minutes later and I still don't know lol

    he tells me this is pretty easy so it makes me feel like a dunce for it not to click




    1. create a function that will take 3 variable parameters that add them together, and print if out void addThreePrint(int x, int y, int z)

    2. call the function 3 times from the main program we 3 different sets of values

    #include <stdio.h>

    void addThreePrint(int x, int y, int z)
    {
    //Create a new variable here

    //Assign the new variable the value of x+y+z;

    //Print out the value of the new variable
    }

    int main()
    {
    //call your function here with 9 8 3

    //call your function here with 4 99 430

    //call your function here with 9999 190 -9999


    return (0);
    }
     
  10. Sweeney

    Sweeney Guest

    Your friend or your teacher?



    #include <stdio.h>

    void addThreePrint(int x, int y, int z)
    {
    //Create a new variable here
    int hmm;
    //Assign the new variable the value of x+y+z;
    hmm = x + y + z;
    //Print out the value of the new variable
    printf("%d\n", hmm);
    }

    int main()
    {
    //call your function here with 9 8 3
    addThreePrint(9, 8, 3);
    //call your function here with 4 99 430
    // "
    //call your function here with 9999 190 -9999
    // "
    return (0);
    }

    Of course if your "friend" meant using the 'new' keyword I'd have a problem with his problem. 'new' isn't needed.
     
  11. Ole Cheapy

    Ole Cheapy Guest


    Nobody uses DOS or C but I wouldn't abandon either of them if i were you. But be warned C will bore the crap outta you at the beginning, but if you can make it past that point you will probably enjoy it.
     
  12. Hera - Siege

    Hera - Siege Lore Master
    Stratics Veteran Stratics Legend

    Joined:
    Apr 3, 2004
    Messages:
    1,181
    Likes Received:
    21
    c# is great if you're working with Windows Forms, but if you're desire is to do anything else, c++ is really what you should be learning, as it's still widely used. [UO is most likely c++ code, as are all other MMOG's/etc out there, I know UOAssist is c++ as I did a little mini-interview for my c++ class. :)]

    c# is slowly [very] taking a bit more hold, but you're way better off learning c++ initially and getting some of the basics down with that and then moving to c#.

    Harder to go from c# to c++ as c# alleviates some of the coding horror that is c++ at times. :)
     
  13. Vortex

    Vortex Slightly Crazed
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    1,470
    Likes Received:
    5
    Hehe, yea, I said easier, not better :D

    With all the trends going to .NET I think C# will continue to take hold.
     
  14. Shakaja

    Shakaja Guest


    buy yourself a good book and go from there. i bought two, one was a c++ introduction to get familiar with the language and the second one was a game programming in direct x one. after a good month, i built my own simple engine and started implementing little things like aparticle engine, an animation system, simple ki enemies etc. the big advantage of this is you learn alot through testing, experimenting and reading information about ideas you have while you dont get frustrated as you keep seeing the result very quickly.
     
  15. Tigsalot

    Tigsalot Journeyman
    Stratics Veteran Stratics Legend

    Joined:
    May 25, 2001
    Messages:
    294
    Likes Received:
    2
  16. Goron

    Goron Guest

    C, maybe... C++ yes, C# yes... just for starters lets say... Microsoft. :)
     
  17. Goron

    Goron Guest

    I fins that to be the best way to approach code... good old fashioned books.

    Once you have a basic understanding then I personally like to start ripping off other people's code and learn from example.