View Full Version : Best way to learn C++
Looking into programming our team's robot but I need to learn C++. Any suggestions as to the best method to learn it?
Please coordinate with your team to not post multiple threads on the same topic. That being said, this (https://wpilib.screenstepslive.com/s/3120/m/7913) would be a good place to start.
connor.worley
24-10-2014, 19:28
http://www.learncpp.com/
SoftwareBug2.0
25-10-2014, 02:10
Please coordinate with your team to not post multiple threads on the same topic. That being said, this (https://wpilib.screenstepslive.com/s/3120/m/7913) would be a good place to start.
I don't recommend this approach. I've worked with students who could fiddle with stuff enough to make things mostly work but didn't really pick up an understanding of programming and couldn't write hello world. It made me very sad. Since you don't have to have a robot ready for competition tomorrow I would recommend learning the language itself before worrying about how to get it on the robot.
faust1706
25-10-2014, 02:26
The college I go to outsources a lot of their classes (or maybe it's just the cs department, but still).
Here are the files:
Lecture Slides (https://www.dropbox.com/sh/gaytuvev2wbof1q/AAA98qDO3cL4zC_ZAQYWyOdQa?dl=0)
Assignments (https://sites.google.com/a/mst.edu/price/courses/cs-1570/hw/2014)
Personally I started programming with Arduino, and it was a small step to C and C++ and Java from there, but you really should only go that route if you think you'll still have tme to learn how to program FRC-specific.
It ends up that I'm teaching many students C++. I am working on a repository of code examples to get everyone started. Everything's open source, so please feel free to use the code.
I haven't pushed yet, but I will today. The repository is at https://github.com/yash101/CodingClub
All the samples are written for Linux, and the binaries only work in Linux. However, you should have no problem compiling most of the code in Windows or Mac (where Mac will compile the code with the same command but will create a different executable).
This won't teach you C++ for a robot, but it does have an open problem set in C++. It also takes a novel online approach to teaching - immediate community feedback. I used it & CodeAcademy to take a crash-course in javascript so I could figure out how to fix a complicated bug in someone else's code the night before a demo at work.
It's alot like ChiefDelphi - there are nuggets of wisdom, and best practices - but knowing which information to trust takes some experience.
http://exercism.io/
This won't teach you C++ for a robot, but it does have an open problem set in C++. It also takes a novel online approach to teaching - immediate community feedback. I used it & CodeAcademy to take a crash-course in javascript so I could figure out how to fix a complicated bug in someone else's code the night before a demo at work.
It's alot like ChiefDelphi - there are nuggets of wisdom, and best practices - but knowing which information to trust takes some experience.
http://exercism.io/
Building on, I suggest that you begin by learning basic C++. Learn what a literal is. Learn what a function is. Learn what is a pointer is, etc. From there, move onto FRC C++. C++ is quite easy as long as you Pace yourself and don't try to build a rocket before you have built a bicycle!
I did push to my repository. I am still adding examples and hope to have a couple hundred soon! Good luck with C++!
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.