Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
‘Strings’ Articles at TC101 Fall 2015
Introduction to Programming Python and C++

Tag Archives: strings

Mastery 25

On this mastery I’ll show you what are strings and how to use them in C++.

String are things that are represented by a sequence of characters.

We will create a function that works as a palindrome and tells the user if the word he input is a palindrome or not. Do as follows:

  1. Create a main program and leave a space before it for the function
  2. Create a function of type string called palindrome
  3. Condition the user input with VARIABLE.rbegin and VARIABLE.rend. This iterators make the string return reversed to the beginning and end. This is the Palindrome “function”
  4. In main(), ask the user for the input and call for the function.

Your program should look something like this:

Now let’s test it:

Great! Now you know how to do a basic program using string. If you want to learn more about strings, go to this webpage:

http://www.cplusplus.com/reference/string/string/

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).