Dismiss Notice

Welcome To CK5!

Registering is free and easy! Hope to see you on the forums soon.

Score a FREE t-shirt and membership sticker when you sign up for a Premium Membership and choose the recurring plan.

C++ programming?

Discussion in 'The Lounge' started by Ryan B., Feb 15, 2005.

  1. Ryan B.

    Ryan B. 3/4 ton status GMOTM Winner

    Joined:
    Jul 18, 2001
    Posts:
    5,693
    Likes Received:
    0
    Location:
    CA
    Anyone here done C++ programming?
    I'm taking an engineering night class on .cpp programming.. only a couple of weeks into the class and its pretty damn frustrating!
    at least the html or ubb code on ck5 has helped me understand some of the crap in the class..:crazy:
     
  2. 84gmcjimmy

    84gmcjimmy 1 ton status

    Joined:
    Dec 3, 2003
    Posts:
    12,838
    Likes Received:
    0
    Location:
    B.C. CANADA
    I did some last year, but what your doing is probably far more advanced.
    Good luck:)
     
  3. spearchucker

    spearchucker 1/2 ton status

    Joined:
    Nov 17, 2003
    Posts:
    1,556
    Likes Received:
    0
    Location:
    Bay area, CA
    Have you tried getting a hold of someone else's working programs? It always help me to study some code and see what they are doing and why. It also helps you figure out the syntax.
     
  4. Ryan B.

    Ryan B. 3/4 ton status GMOTM Winner

    Joined:
    Jul 18, 2001
    Posts:
    5,693
    Likes Received:
    0
    Location:
    CA
    totally.... i build my programs off of copying a previous program and just deleting all the information so the languge for the commands are still there,.. then insert my own info and cut and paste, and start building ...
    The very first thing that we did was copy the teachers program. a simple program but nonetheless shows you the programming language format. Then we have to build different programs of our own..
    One of my homework problems is to build a program that the input will be a date in the MM/DD/YY format, six numbers.. 02/13/89 Then the output has to be: Feburary 13th 1989. The program has to limit the possibilities for each month and day, ( basically a bunch of if / then statements) so that there couldn't be say 02/31/89, but there could for 12/31/89.. and also has to have a cutoff point somewhere between 1900 and 2000.. very glad we don't have to account for leap years though. :crazy:
    AAAAHHHHHH. :crazy: :confused: fun stuff.:surepal: :screwy:

    The teacher had us convinced that we all had to buy a version of Microsoft Visual C++ for around $80.. until a friend told me about Dev-C++ downloadable at bloodshed.net :grin: I have also heard about a program called Empire or something that tells you what you need to do to fix the errors in your program.

    I see how easily i could build a program to calculate gear ratio or cubic inch displacement or compression ratio, much like you find on websites.. asking for the inputs and spitting out your magic number. so that is kinda cool. :blush: :cool1:
     
    Last edited: Feb 16, 2005
  5. spearchucker

    spearchucker 1/2 ton status

    Joined:
    Nov 17, 2003
    Posts:
    1,556
    Likes Received:
    0
    Location:
    Bay area, CA
    It doesn't sound that overly complicated. Do you start out with flowcharts first? Like you said, you just need to parse the input, convert the first # to a string, second number just needs 3 if/then statements, and the third # just gets concatenated to another #. You should also consider putting in the check for leap year to impress your instructor (i.e. kiss ass). If the year is divisible by 4 then it's a leap yr. One extra if/then or about a dozen extra lines should do it, just do that after everything else is working.
    Are you going to SJSU?
     
    Last edited: Feb 16, 2005
  6. sickquad

    sickquad 1/2 ton status

    Joined:
    Jul 23, 2003
    Posts:
    785
    Likes Received:
    0
    Location:
    Ma
    When I took it in school I found a book with a bunch of examples that pointed me in the right direction. It might have been a programming for dummies class. I would say copying other code is a bad idea. Our final exam was on paper and a few people who copied code actually failed the class. Final exam = 60% grade. Looking at examples helped me to learn the information.
     
  7. Ryan B.

    Ryan B. 3/4 ton status GMOTM Winner

    Joined:
    Jul 18, 2001
    Posts:
    5,693
    Likes Received:
    0
    Location:
    CA
    Thanks for your comments and suggestions guys. :D

    Planning on transfering to SJSU for mechanical engineering in another year or so.. I'm working towards an AS in Math/Physics. :crazy:
    I don't really do flowcharts yet though he reccomends it.. More like scribbling out my psuedocode on a piece of paper so i have a good idea what to do before i begin.
    Yah our final is 30%.. and i just use the previous programs to speed up things and get me used to building programs at first.. like i said i'm only a couple of weeks into the class.. I agree, i'm not going to be basing the whole class on copying other code, just to help me at first. i almost have the commands memorized what needs to go where.
    All our tests are also Open Book but Closed Notes. he said that looking up the info and knowing where to find it in your books is something you'll have to do out in a real job so you should be allowed to do the same in class. hehehe.. well what about when you take some notes in the book. :blush: ;)
     
  8. spearchucker

    spearchucker 1/2 ton status

    Joined:
    Nov 17, 2003
    Posts:
    1,556
    Likes Received:
    0
    Location:
    Bay area, CA
    Some of my professors way back when said the same thing. It's not what you memorize but being able to find what you need and knowing how to use it. I had a couple of professors say the same thing, open notes, open book, literally bring whatever you want. Let me tell you, that didn't help at all. Flipping through page after page and book after book eats up alot of prescious time, and you still don't have what you're looking for. Talk about being lost. :blush: I can remember of about 4 or 5 professors who let you do this ranging from physics, calculus, and some of my courses in EE. Bottom line, do the homework and know your chit. :thumb:
     
  9. 87GMCJimmy

    87GMCJimmy 1/2 ton status

    Joined:
    Nov 21, 2001
    Posts:
    582
    Likes Received:
    0
    Location:
    Phoenix, AZ
    I've written a line or two.:D Much of it was just using a C++ compiler in a functional based architecture. When used like that it much easier to understand and is very similar in design to other coding languages. The fun starts when you go to an OO architecture and don't have a good feel for what is going on.:yikes: However, I doubt that your getting deep into OO in a college class. None of mine did but that was a while ago. Is there anything in particular that getting you messed up? What other programming experience do you have? As everyone else has pointed out don't re-invent the wheel. Find something that same/similar and go for it.



    Good Luck,:thumb:

    Mike
     
  10. 84gmcjimmy

    84gmcjimmy 1 ton status

    Joined:
    Dec 3, 2003
    Posts:
    12,838
    Likes Received:
    0
    Location:
    B.C. CANADA
    So I can download this online? How different is it from the real version? Thanks!
     
  11. OrangeCrushK10

    OrangeCrushK10 1/2 ton status

    Joined:
    Jan 25, 2003
    Posts:
    1,425
    Likes Received:
    0
    Location:
    Square State + Suspension Item
    I still have nightmares about the semi-colon....

    People who have done C++ will know of the horrors of which I speak.
     
  12. mr_clean

    mr_clean 1/2 ton status

    Joined:
    Sep 21, 2003
    Posts:
    348
    Likes Received:
    0
    Location:
    Sacramento, CA
    hahahaha. the ; will bite you every time...


    I've done C++ before. Lots in college all the way up to data structures *YUCK*

    It's been a while but I still have my books and stuff, if you have a specific question I can look it up if I don't remember.

    Sounds like you need a case statement though. Much cleaner than if elseif stuff...

    Now, it's mostly VB.NET and ASP.NET stuff I do.

    Scott
     
  13. 87GMCJimmy

    87GMCJimmy 1/2 ton status

    Joined:
    Nov 21, 2001
    Posts:
    582
    Likes Received:
    0
    Location:
    Phoenix, AZ
    Just a question to all. Do they teach OO well in classes now a days? When I took C++ in.....gezz I'm getting old 1994.... The Prof was supposed to be one of the cutting edge people in C++ OO design. He was good but in a semester you really didn't need good OO skills to get through it. I think it would take at least 2-3 semesters to really address it. Anyhoo..... just curious.

    Mike
     
  14. mr_clean

    mr_clean 1/2 ton status

    Joined:
    Sep 21, 2003
    Posts:
    348
    Likes Received:
    0
    Location:
    Sacramento, CA
    My classes tought it pretty well I feel. My problem is when I got into the job industry, I was writing mainly asp and vb6. no oop there. So now that I'm doing .net stuff I've had to re-learn all about oop (inheritance, overloading, polymorphism, constructors, destructors... all that good stuff I haven't used since college...)
     

Share This Page