Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Kody Ellis
Kody Ellis
2,098 Points

Switching from Ruby to C++

To make a long story short, I have a college class next semester that deals with c++. I've known this since late July, so to get more used to programming languages before hand, I've decided to practice Ruby for a few months and then switch to c++ before the class starts at January.

Currently, I'm only using this website to learn ruby. I decided that my deadline of learning ruby and switching to c++ will be late next month in October.

Gauging my current progress, hopefully the things I've learned in Ruby before I switch would be::

Strings, user input ,variables, numbers, arithmetic operators, methods, and control statements(if-else), collections(arrays-hashes, loops(while into, for, iteration, .times method); classes, objects, booleans, and Ruby blocks.

What are the main things I need to look out for when switch over to c++? What are some things that I can't take for granted unlike when I was using Ruby???? Due to the detail and complexity of these programming languages, I understand if you can't list alot of things, but I would really love it if you could just a few key things listed.

3 Answers

It depends on your class. I suggest you do some research about the class so you know at least what to expect. Learning other languages isn't that hard now that you know the core concepts of programming. My first CS class that was focusing on C++ was CS162 (@ Portland State University). The professor went over the basic core concepts in the first few weeks. Then she went over classes and structs, the use of pointers, and a type of data structure called linked list.

Kody Ellis
Kody Ellis
2,098 Points

Thanks, I did not think about researching about the class before. I looked at the online class description, but it is very minimal in that it only says that it has a huge emphasis on logic, functions, and algorithmic problems. It looks like the next step is to check with some upperclassman who already toke the class or more likely the teacher for more info it.

Things like inheritance, pointers and recursion seem to be for the programming 2 course in my sophomore year. These seem like advanced topics so I'm glad that it won't be in my class next semester.

However the information might all be outdated so I'll definitely check back with the teacher soon to see if she could send me some information for the programming 1 class next semester.

Ricky Catron
Ricky Catron
13,023 Points

It has been a while since I did C++ but I will take a shot. Ruby is a higher level language then C++ so more is done for you. The code looks cleaner so C++ will look messy and complex in comparison. You also need to be much more explicit with types and memory management. Strings also will behave slightly differently. C++ is compiled and Ruby is interpreted. There is a lot more but as long as you know like you said if statements, loops, functions, classes, and objects the transition should be okay.

--Ricky

Kody Ellis
Kody Ellis
2,098 Points

Hello, thank you for the reply, I will definitely keep all of that in mind when I take the class next semester.

Kody Ellis
Kody Ellis
2,098 Points

It took a while, but having got my hands on this semester's syllabus and asking a few on the upperclassmen, basically the class will cover about 2/3 of the concepts I already covered while doing Ruby, plus algorithms, simple/user-defined data types, strings and character data.

Like Mr.Villanueva stated, because I already know some of the basic programming concepts already, so doing C++ should be smooth transition, but like Mr.Catron stated, I will have really adjust to C++ being basically more detailed and explicit than Ruby