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 trialMiguel Leon
1,720 PointsIs there a c++ track in treehouse ?
or either in library or something
1 Answer
Douglas Counts
10,126 PointsYes there is a C++ Track, it is the Apple C++ version commonly referred to as Objective-C. You can actually use your same .h, .c, and .cpp files within an Objective-C project. In fact, the compiler backend is similar and based upon the same one used to compile Unix applications. You will see a unique nomenclature when referring to host variables, like the UI Views and NextStep Objects, but other than that you can use native Cstrings and the rest if you are a masochist.
Most C and C++ libraries can be compiled within an Objective-C project and used just like any other C++ language. Most C/C++ applications written for iOS usually rely heavily upon the host environment's supplied objects which is why the UI code looks different. But if you were just writing a library, the code would look similar, perhaps not different at all, from what you would normally write.
You can write console programs for example just like you would expect to.
Later....
Doug
Robert Richey
Courses Plus Student 16,352 PointsRobert Richey
Courses Plus Student 16,352 PointsFrom what I understand about Objective-C, which is very little, is that it handles I/O and file ops notably different from C++, according to my former C++ professor.
Douglas Counts
10,126 PointsDouglas Counts
10,126 PointsNot really, you can even use the old school I/O piping indicators to print out to the console and everything. Objective-C is simply a layer applied on top of the same generic compiler used to build Unix apps and even window apps that use the QT interface library for example. Much like QT is a layer on top of C/C++, so is the Objective-C layer. Yes it that layer looks different but you don't have to use it to right libraries or console apps.
For example, you can compile the popular SQLite Library's source code right from within Apple's Xcode Editor. Objective-C is just another layer that you can write to our not. If you want to use the Apple UI widgets then yes you are going to need to just like if you wanted to use QT's widgets. But again console apps and libraries don't need such access. If you are writing those every thing is easy. In fact, I learned C++ writing console apps from a textbook.
Later...
Robert Richey
Courses Plus Student 16,352 PointsRobert Richey
Courses Plus Student 16,352 PointsI do appreciate the detailed explanation.
Cheers Douglas