Learning C++, any suggestions?
Hey guys! I'm currently in Computer Science 2 (College Level, Honors) as a Freshman. Unfortunately, my expertise is JAVA...so I don't know too much about C++. This means I'm practically 2 years behind! Why did I have to learn JAVA and get a 4 in the Computer Science AP test...and then end up being thrust into the world of C++? I'm a little nervous, but I have come to the realization that I have allies on my quest to learning this language.
Do you guys have any suggestions? What are good C++ compilers? Where should I start? I'm good with programming concepts in general, but the actual specific language of C++ is unfamiliar to me. Halp?!
Comments
If you are going to get into programing for GUI systems I suggest you look into wxWidgets. It is a cross platform system that you can compile to work with Mac, *Nix and Windows.
Stay away from MFC (Microsoft Foundation Classes) until you have mastered the core of the language and the API you are working with. You can code faster using those systems but when something goes wrong you may find yourself unable to fix it or even understand why it went wrong.
But I wish you luck!
I remember when my wife came home from school one day with a programming assignment about writing a personal banking program that had to cover mortgages and interest rates and compounding those interest rates. she was none too happy with the assignment.
The trick with writing code is being able to figure out the optimal way to do something and then be able to translate that into computer code.
Let me give you one tip that may help you: Create a private function for checking the validity of the date input that each public function can call on.
Oh yes, is this meant to be a GUI program or a console program?
The days to date I have yet to see, but as for the increment date... Fun assignment. Good luck
It was actually very easy. Thank you guys for your help!
Edit: It was merely console. The hardest part was implementing Julian something-or-other for the daysToDate function.
What should I learn to start? What's the most basic (is it BASIC?) to learn, and what do I need?
(Though I already grasp the general concepts...and the programming itself is quite similar. Maybe I'd have a head start?)
If (year % 4 == 0)
....etc
Every 4 years is a leap year. Unless it is divisible by 100, then it is not a leap year. Unless that is divisible by 400, then it is a leap year. So the year 1900 was not a leap year, even though by the rule of 4's it should have been. And, along with that, 2000 was, even though it is divisible by 100 due to the fact it was divisible by 400. I noticed that the default year you gave was 1900, so just thought I'd give my 2 cents. This issue is due to the fact that the world revolves the sun every 365.242375 days. They current way of doing leap years places it close (but not quite) at that measuring an average of 365.2425. I dunno if your teacher will actually look that far into it, but still good to know.
Hmmmm... Let's hope I'll remember that if I ever get a similar assignment.
Thanks for the help, though. THIS is why I post here.