text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

c02p079.cpp

Go to the documentation of this file.
00001 
00022 void writeBackward(string s, int size)
00023 {
00024    if (size > 0)
00025    {  // write the last character
00026       cout << s.substr(size-1, 1);
00027 
00028       // write the rest of the string backward
00029       writeBackward(s, size-1);  // Point A
00030    }  // end if
00031 
00032    // size == 0 is the base case - do nothing
00033 }  // end writeBackward

Generated on Sun Aug 27 11:05:08 2006 for AWLogo by  doxygen 1.4.6