Newb C++ Programmer

This is a discussion on Newb C++ Programmer within the C++ Programming forums, part of the General Programming Boards category; After looking around for a good C++ forum I decided to give these forums a try I just started learning ...

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    63

    Newb C++ Programmer

    After looking around for a good C++ forum I decided to give these forums a try

    I just started learning C++ recently, and I'm on Day 16 of Sams Teach Yourself C++ in 21 Days (by Jesse Liberty). On March 1st I'm going to be competing in: http://contest-cemc.uwaterloo.ca/ccc...overview.shtml

    Not so much to win, simply because I know that University of Waterloo (where I'm thinking of taking courses) checks to see if you have participated in that contest (along with others).

    I was wondering if anybody could give me some good newb C++ pointers. (not the kind that points to a variable's location in the memory and can be accessed by dereferencing! )
    PS: I'm not a complete newb. I learned PHP and have some previous Javascript experience...so some of the basic ideas and concepts are looking familiar.

    Thanks!
    Last edited by Philandrew; 10-18-2004 at 07:55 PM.

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Hola. Welcome to the forum.

    It's hard to give pointers without a specific topic. With that in mind, perhaps browse through the tutorials. You have anything you want us to help you with, just ask. A couple points about the forum that will make your stay much more enjoyable (saves time and insults):

    a) Always make sure to use code tags.
    b) Always try to solve problems, and show people what you've tried.
    c) Never let anyone here see 'void main' in your code.

    Anyway, as I said, welcome.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    63
    a) Always make sure to use code tags.
    Got the gist of that one after seeing some nasty results after a few people didn't
    b) Always try to solve problems, and show people what you've tried.
    Sounds like a deal
    c) Never let anyone here see 'void main' in your code.
    Book drilled that one out of me on Day 1

  4. #4
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    try to answer as many questions as you can that are posted here, even if you don't post your answers.

    try the challenge section of this site. Go to homepage to find it.

    find other sites that list (contest) problems and have answers available. Try to solve the problem on your own, then look at posted solutions and ranking provided (if available)

    finish the book you're on, then go to another book (intermediate or even another beginner book) and work through it (its amazing all the detail that can be stuffed in even a beginner book that I overlook after reading through it just once).

    try your hand at your own project--maybe write something in C++ you did in another language, whatever.

    Basically, write as much code as you can and look for other ways to do things.

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Well, browse around the board and try picking up as many ideas and facts as you can - and try them out. You'd be surprised how much little code tricks/shortcuts can help. A couple I can think of offhand are traversing a 2D array as you would a 1D array via a separate pointer, using & and | to deal with bit flags, using the sort() method of the std::list rather than doing it manually, using recursion for a floodfill-type algorithm (that was used on one of the older competitions - counting floorspace or something. I didn't think of it until I read someone's solution). And, along the same note, go to the CCC website and download their old contests (PDF format), try them, and when you're done or stuck then you can google for "Canadian Computing Competition solutions". Many of the sites are done in Java, but you can pick out the concepts and rewrite them in C++.

    That's what I'll be doing as I prep for the senior competition this february
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  6. #6
    Registered User
    Join Date
    Oct 2004
    Posts
    63
    Some good tips guys, thanks!

    And, along the same note, go to the CCC website and download their old contests (PDF format), try them, and when you're done or stuck then you can google for "Canadian Computing Competition solutions". Many of the sites are done in Java, but you can pick out the concepts and rewrite them in C++.

    That's what I'll be doing as I prep for the senior competition this february
    Already got all of em and beginning to work on some of em I'm competing too...looks good when applying to university of waterloo

  7. #7
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    That reminds me... You might want to take a look at the USACO competition. They have a training bit and all (you work one problem, submit it, if it was correct, then you get to move on). As long as you get over the guy's obsession with cows.

    *Note: Submitting the solution, etc is a really quick procedure as you upload the CPP file, it is compiled and run, and if it spits out the right data, it is considered to have worked.

    *edit
    The link: http://ace.delos.com/usacogate
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  8. #8
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Lightbulb For further reading...

    None of these books are as well structured for self-study as 21 days, but I've found them all useful.

    The C++ Standard Library, By Nicolai M. Josuttis.
    This book completely covers the Standard Template Library. (21 Days does not cover the STL.)

    Thinking In C++, by Bruce Eckel.
    This makes a good 2nd C++ book, although it was written as a 1st C++ book for those that already know C. It comes in two volumes and covers many C++ topics in-depth. You can download it FREE, or buy hard copies.

    The C++ Programming Language, by Bjarne Stroustrup.
    This book is for intermediate to advanced programmers. I usually say it's like a book on brain surgery... you need a background in biology an physiology to understand a book on brain surgery! If you're planning to get a degree in computer science, you'll probably buy this book eventually. And, it's really cool to own the book by the creator of C++!

    Programming Windows, by Charles Petzold.
    This is the book to get if you want to learn Windows programming. You don't need to know any advanced C++ to start Windows programming... In fact, this book only uses C. But, it's not easy! I was shocked when first I opened the book and saw that "Hello Windows" was 2 pages of code! And, I didn't recognize much of it. (It's all functions, structures, typedefs, and constants from the <windows> library.)

  9. #9
    Registered User
    Join Date
    Oct 2004
    Posts
    63
    Some of those other books look like some nice ones to take a look at

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What game programmer should I be? need some advice.
    By m3rk in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 04-20-2009, 11:12 PM
  2. Replies: 2
    Last Post: 07-12-2008, 11:06 AM
  3. Programmer (vs) Coder
    By Brain Cell in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 03-24-2005, 12:59 PM
  4. Replies: 8
    Last Post: 01-04-2004, 11:01 AM
  5. I need to interview professional programmer.....please
    By incognito in forum C++ Programming
    Replies: 1
    Last Post: 01-05-2002, 01:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21