Off Topic > Off Topic

should i enroll in a $800 online c++ learning course

Pages: << < (6/13) > >>

*Trinick:


--- Quote from: Pecon on November 28, 2017, 10:22:43 PM ---The only reason I'd consider recommending C++ as a first language is so that person can learn how to solve more complex problems in the long run. Manipulating strings by looping through them one character at a time; among other things, really makes you appreciate the string functions that most higher level languages give you, and basically teaches you that there is a 'do it yourself' option for everything if a library doesn't provide it.

--- End quote ---

Looping through character arrays is C as forget. C++ has std::string which implements the equals operator, insert, size, empty, find, etc.

Pecon:


--- Quote from: *Trinick on November 28, 2017, 10:29:01 PM ---Looping through character arrays is C as forget. C++ has std::string which implements the equals operator, insert, size, empty, find, etc.

--- End quote ---
I know, but you also don't have to show them the String library right away. In most higher level languages you have to use the given string functions regardless of what method you go about it, but you can teach those lower level concepts by first introducing char arrays and working with those.

cooolguy32:

no that's just plain stupid, there is literally many ways to learn it online for free

*Trinick:


--- Quote from: Pecon on November 28, 2017, 10:37:22 PM ---I know, but you also don't have to show them the String library right away. In most higher level languages you have to use the given string functions regardless of what method you go about it, but you can teach those lower level concepts by first introducing char arrays and working with those.

--- End quote ---

In what language can you not iterate through a string character by character? Even Torque has getSubStr($string,start,length).

Pecon:


--- Quote from: *Trinick on November 28, 2017, 10:41:43 PM ---In what language can you not iterate through a string character by character? Even Torque has getSubStr($string,start,length).

--- End quote ---
That's still using a string function, all I meant was that you can't avoid using string functions for that in a higher level language- therefore it's kinda irrelevant that C++ has library functions available. To someone you're trying to teach this method to, using array accessors to loop through the string makes a lot more sense than repeatedly calling substring (ideally they don't even know string functions exist, since that could make them question the usefulness of learning this in the first place); but they should find it easy later on to implement that knowledge using substring or whatnot in their chosen language.

Pages: << < (6/13) > >>

Go to full version