New Posts  All Forums:Forum Nav:

learning C++

post #1 of 17
Thread Starter 
i took a semester of C, and plan to take the required C++ class next year. i often hear people complain about the difficulty of the class, and i won't be able to spend too much time on the class due to my schedule, so i want to get a head start and learn C++ now. my question is - what would be the best way for me to learn?

i've tried learncpp.com but it's too much reading for me. even with my C class, i never read the book. i just did all of the assignments and googled something whenever i had a question. programming is just more hands-on, and i end up focusing and learning more from doing something rather than reading about it
Nameless
(11 items)
 
  
CPUMotherboardGraphicsRAM
3770k p8z77-i deluxe asus 660 ti ripjaws x 
Hard DriveHard DriveCoolingCooling
caviar black intel 520 phanteks ph-tc14pe bitfenix spectre 230mm fan 
OSPowerCase
windows 7  seasonic x650 prodigy 
  hide details  
Reply
Nameless
(11 items)
 
  
CPUMotherboardGraphicsRAM
3770k p8z77-i deluxe asus 660 ti ripjaws x 
Hard DriveHard DriveCoolingCooling
caviar black intel 520 phanteks ph-tc14pe bitfenix spectre 230mm fan 
OSPowerCase
windows 7  seasonic x650 prodigy 
  hide details  
Reply
post #2 of 17
Well if you want to learn any language on your own, it's going to involve some sort of reading. It's impossible not to so I'm not sure how you're going to avoid it. You could try just solving problems from some place like Project Euler although without some base knowledge, that might be a challenge. I would recommend looking through this thread to see if there are some resources that are less reading heavy and more examples.

http://www.overclock.net/t/1270646/in-progress-consolidated-programming-language-learning-resources-list

I have found that this is an awesome place to help understand certain concepts as it gives many examples and shows rather than tells which is what you're looking for. It is not so much a tutorial but rather a reference to key concepts and functions so this might be the place to start for you even though it's not totally complete.

http://www.tutorialspoint.com/cplusplus/index.htm
Project Arch
(16 items)
 
BigByte
(8 items)
 
Macbook Pro
(8 items)
 
CPUMotherboardGraphicsRAM
Intel i7 5960x @ 4.8ghz Asus X99-E WS 2 x Nvidia Quadro K6000 Corsair Dominator Platinum 64gb 2666 
Hard DriveCoolingOSMonitor
2 x Samsung 850 Pro 512gb {RAID 0} Swiftech H320 w/ Noctua NF-F12 iPPC Arch Linux w/ OpenBox 2 x LG 31MU97 Cinema 4K 
KeyboardPowerCaseMouse
Vortex KBC Poker II PBT EVGA SuperNOVA 1000 G2 Corsair Obsidian 450D Zowie FK1 
Mouse PadAudioAudioOther
Steelseries QCK+ Beyerdynamic DT 770 Pro 80Ω Audioengine D1 Intel X540-T2 NIC 
CPUMotherboardRAMHard Drive
Intel Avoton C2750 Octa-Core ASRock C2750D4I Samsung 64gb ECC 1600mhz 8 x Samsung 850 Pro 1TB 
OSPowerCaseOther
FreeNAS SilverStone ST45SF-G 450w SilverStone DS380 Intel X540-T2 NIC 
CPUGraphicsGraphicsRAM
Intel i7-4960HQ Intel Iris 5200 Pro NVIDIA GT 750M 2gb 16gb (2x8gb) 1600mhz 
Hard DriveMonitorMouseMouse Pad
1tb PCIe SSD 15.4" {2880x1800} IPS SteelSeries Sensei [RAW] SteelSeries QcK Mini 
  hide details  
Reply
Project Arch
(16 items)
 
BigByte
(8 items)
 
Macbook Pro
(8 items)
 
CPUMotherboardGraphicsRAM
Intel i7 5960x @ 4.8ghz Asus X99-E WS 2 x Nvidia Quadro K6000 Corsair Dominator Platinum 64gb 2666 
Hard DriveCoolingOSMonitor
2 x Samsung 850 Pro 512gb {RAID 0} Swiftech H320 w/ Noctua NF-F12 iPPC Arch Linux w/ OpenBox 2 x LG 31MU97 Cinema 4K 
KeyboardPowerCaseMouse
Vortex KBC Poker II PBT EVGA SuperNOVA 1000 G2 Corsair Obsidian 450D Zowie FK1 
Mouse PadAudioAudioOther
Steelseries QCK+ Beyerdynamic DT 770 Pro 80Ω Audioengine D1 Intel X540-T2 NIC 
CPUMotherboardRAMHard Drive
Intel Avoton C2750 Octa-Core ASRock C2750D4I Samsung 64gb ECC 1600mhz 8 x Samsung 850 Pro 1TB 
OSPowerCaseOther
FreeNAS SilverStone ST45SF-G 450w SilverStone DS380 Intel X540-T2 NIC 
CPUGraphicsGraphicsRAM
Intel i7-4960HQ Intel Iris 5200 Pro NVIDIA GT 750M 2gb 16gb (2x8gb) 1600mhz 
Hard DriveMonitorMouseMouse Pad
1tb PCIe SSD 15.4" {2880x1800} IPS SteelSeries Sensei [RAW] SteelSeries QcK Mini 
  hide details  
Reply
post #3 of 17
I have tried learning to program twice in my life, one in High school and again in college. It worked out neither time. I think the best way to learn (As with anything) is to actually do it surrounded by people who know how to use c++. Have any friends who are programing wizards? I wish you the best of luck seeing as I couldn't stay awake in the classes. I guess software doesn't hold the raw appeal that hardware does for me. biggrin.gif
The Sleeper
(10 items)
 
 
Sony Xperia Z3
(7 items)
 
CPUMotherboardGraphicsGraphics
AMD FX 8320  Asus Sabertooth 990FX R2.0 MSI Radeon 7950 MSI Radeon 7950 
RAMHard DriveCoolingOS
8GB Crucial Ballistix Sport 1600mhz Samsung 470 SSD Corsair H80i Windows 7 64 Bit Home Premium 
PowerCase
Corsair HX850 Coolermaster HAF 932 
CPUMotherboardGraphicsRAM
Intel SU7300 Core2Duo 1.6 Ghz Alienware OEM Nvidia 335m 8 GB PNY memory 
Hard DriveOSMonitor
Samsing 840 SSD Windows 7 Home Premium 64-Bit Generic PNP monitor @ 75hz 
CPUGraphicsRAMHard Drive
Snapdragon 801 @ 2.5 Ghz Adreno 330 3 GB 32 GB  
CoolingOSMonitor
Blow on it Android 4.4.4 1920x1080 LCD 
  hide details  
Reply
The Sleeper
(10 items)
 
 
Sony Xperia Z3
(7 items)
 
CPUMotherboardGraphicsGraphics
AMD FX 8320  Asus Sabertooth 990FX R2.0 MSI Radeon 7950 MSI Radeon 7950 
RAMHard DriveCoolingOS
8GB Crucial Ballistix Sport 1600mhz Samsung 470 SSD Corsair H80i Windows 7 64 Bit Home Premium 
PowerCase
Corsair HX850 Coolermaster HAF 932 
CPUMotherboardGraphicsRAM
Intel SU7300 Core2Duo 1.6 Ghz Alienware OEM Nvidia 335m 8 GB PNY memory 
Hard DriveOSMonitor
Samsing 840 SSD Windows 7 Home Premium 64-Bit Generic PNP monitor @ 75hz 
CPUGraphicsRAMHard Drive
Snapdragon 801 @ 2.5 Ghz Adreno 330 3 GB 32 GB  
CoolingOSMonitor
Blow on it Android 4.4.4 1920x1080 LCD 
  hide details  
Reply
post #4 of 17
Quote:
Originally Posted by Zboy View Post

i took a semester of C, and plan to take the required C++ class next year. i often hear people complain about the difficulty of the class, and i won't be able to spend too much time on the class due to my schedule, so i want to get a head start and learn C++ now. my question is - what would be the best way for me to learn?

i've tried learncpp.com but it's too much reading for me. even with my C class, i never read the book. i just did all of the assignments and googled something whenever i had a question. programming is just more hands-on, and i end up focusing and learning more from doing something rather than reading about it

Edit: Please don't take this as a flame. It's only well-meaning advice from my life experience.

 

You will never make it in programming with that attitude. When I took C++ in college, I was shocked at the number of people who refused to read the textbook and wondered why the class was hard, but I never saw people who studied the book having any problems. The logic in a basic C++ course is easy, you just need to read the textbook and then code some of the problems it gives (preferably the harder ones as one hard problem is worth all those easy ones before it and then some). There are no shortcuts to being a good coder. The job's not as easy as many first believe and reading/research is required.

 

Programming involves constantly reading to make yourself better at your job and able to understand your job. Need a new library? That's hundreds of pages of documentation to actually understand what you're doing. You either read the documentation now or read it when the bugs start pouring in because there were side effects you didn't know about (hint: the second option will hose you completely). Have a hard question about some problem? The chances are that the correct answer is in some 100+ page paper a researcher did a couple of years ago. Any subgenre of programming you can think of requires hundreds of hours of reading about the code and problems involved. If you are asking questions to your peers and the questions are clearly answered in the man pages, it won't take very long before you just get angry "RTFM!!" answers.

 

I and several others on this site are more than willing to help you, but we won't be able to make up for you reading the proper resources (and you'll simply be reading what we wrote on the fly instead of what was written by someone who had checks and reviews to ensure readability and perhaps accuracy).


Edited by hajile - 6/8/13 at 3:10pm
post #5 of 17
Thread Starter 
i guess i should have been clearer....i don't have a problem with reading. i have a problem with being bombarded by words

a bit of a sidenote, but in the case of my C class, the textbook was written by a professor at my school and scanned for us to access online. it was horrible, being written and presented in a way unclear to first time programmers, with examples on new topics that had unintentionally broken code, and the scan itself was hard to read as it was printed with a type writer. that's why i never read the textbook - if it was a little more reader friendly, i might have considered scanning over it instead of reading the discussions/resources i found online.

but back to the topic. like i said, i would always do the assignments and google something if i ever had a question. my reading usually stemmed from "i have these tools that i don't know how to use" or "i have a problem that i don't know how to approach." in those cases, i was actively looking for an explanation. i already had a level of understanding of the topic, or why learning about it would be important. immediately after reading about it i could give a shot at implementing it into my program, or at least think about how to implement it. what i don't want to do is read a textbook and "learn" about concept after concept, without having a real understanding of any of it or why it's significant. things would just go in one ear and out the other if i didn't get the chance to really understand them
Edited by Zboy - 6/8/13 at 5:27pm
Nameless
(11 items)
 
  
CPUMotherboardGraphicsRAM
3770k p8z77-i deluxe asus 660 ti ripjaws x 
Hard DriveHard DriveCoolingCooling
caviar black intel 520 phanteks ph-tc14pe bitfenix spectre 230mm fan 
OSPowerCase
windows 7  seasonic x650 prodigy 
  hide details  
Reply
Nameless
(11 items)
 
  
CPUMotherboardGraphicsRAM
3770k p8z77-i deluxe asus 660 ti ripjaws x 
Hard DriveHard DriveCoolingCooling
caviar black intel 520 phanteks ph-tc14pe bitfenix spectre 230mm fan 
OSPowerCase
windows 7  seasonic x650 prodigy 
  hide details  
Reply
post #6 of 17
Quote:
Originally Posted by Zboy View Post

i guess i should have been clearer....i don't have a problem with reading. i have a problem with being bombarded by words

a bit of a sidenote, but in the case of my C class, the textbook was written by a professor at my school and scanned for us to access online. it was horrible, being written and presented in a way unclear to first time programmers, with examples on new topics that had unintentionally broken code, and the scan itself was hard to read as it was printed with a type writer. that's why i never read the textbook - if it was a little more reader friendly, i might have considered scanning over it instead of reading the discussions/resources i found online.

but back to the topic. like i said, i would always do the assignments and google something if i ever had a question. my reading usually stemmed from "i have these tools that i don't know how to use" or "i have a problem that i don't know how to approach." in those cases, i was actively looking for an explanation. i already had a level of understanding of the topic, or why learning about it would be important. immediately after reading about it i could give a shot at implementing it into my program, or at least think about how to implement it. what i don't want to do is read a textbook and "learn" about concept after concept, without having a real understanding of any of it or why it's significant. things would just go in one ear and out the other if i didn't get the chance to really understand them

That does clear some things up. Unfortunately, everything you learn in an intro C or C++ class is always going to be used for everything, but you need to know ALL the basics before you can apply them to most "real world" problems. While you might not like reading the lingo of computer science, it is essential to progressing to a higher level. Pushing yourself to memorize the vocabulary early will make later courses easier.

 

If you want some basic exercises, try the linked list problems from here. Projecteuler.net offers thousands of programming challenges of various degrees of difficulty (overclock.net has a thread for discussion here). We have a few programming challenges here as well.

post #7 of 17
The main difference between C and C++ is the fact that C doesn't use objects.

Project Euler isn't going to help much in learning object oriented programming. That's something you are just gonna have to read about.
Project Chloe
(16 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz 1.280v Fatal1ty Z68 Professional Gen3 MSI R6950 Twin Frozr III Corsair Vengence 8GB 1600MHz 
Hard DriveHard DriveOptical DriveOS
OCZ Vertex 4 Samsung Spinpoint F3 Asus 24X DVD Burner Windows 7 Ultimate 64bit 
MonitorMonitorKeyboardPower
ASUS VE228H ASUS VE228H Razor Blackwidow  Corsair 850HX 
CaseMouseMouse PadAudio
HAF X Logitech G500 Razer Goliathus Logitech G930 
  hide details  
Reply
Project Chloe
(16 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz 1.280v Fatal1ty Z68 Professional Gen3 MSI R6950 Twin Frozr III Corsair Vengence 8GB 1600MHz 
Hard DriveHard DriveOptical DriveOS
OCZ Vertex 4 Samsung Spinpoint F3 Asus 24X DVD Burner Windows 7 Ultimate 64bit 
MonitorMonitorKeyboardPower
ASUS VE228H ASUS VE228H Razor Blackwidow  Corsair 850HX 
CaseMouseMouse PadAudio
HAF X Logitech G500 Razer Goliathus Logitech G930 
  hide details  
Reply
post #8 of 17
I code for a living - mostly SQL Server development work, but frequent work in .Net, and I can tell you that in my experience, learning to program without frequent, healthy doses of written theory *will* lead to bad habits and code that is difficult to maintain. Time and again I've seen young coders come in whose degrees may not have even been related to computer science, but they've since taken an interest or had an aptitude for it when an entry-level programmer position fell into their lap. They would go all cowboy with it and come up with some neat stuff, but projects they worked on that had legs to any degree tended to cause them trouble and rework.

You can't just write code. You have to have enough perspective to ensure that your approach/methodology is reasonable, given the requirements - perspective that only theory and/or experience can provide.
post #9 of 17
When picking up any languages.... please take the extra effort to go out and search for "best practices" and understand why things are done in certain ways.


i.e. I have to clean up 10 years worth of code utilizing dynamic SQL instead of parameterized calls. The original developers didn't know and no one raised their hand about this bad practice....
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #10 of 17
Quote:
Originally Posted by DuckieHo View Post

When picking up any languages.... please take the extra effort to go out and search for "best practices" and understand why things are done in certain ways.


i.e. I have to clean up 10 years worth of code utilizing dynamic SQL instead of parameterized calls. The original developers didn't know and no one raised their hand about this bad practice....

To be fair, did many languages even support parameterized calls a decade ago?
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming