Question: reverse.cpp: In function 'void displayBackwards ( std::string ) ' : reverse.cpp: 2 0 : 3 1 : error: 'pos' was not declared in this scope

reverse.cpp: In function 'void displayBackwards(std::string)':
reverse.cpp:20:31: error: 'pos' was not declared in this scope
20| displayBackwards(s.substr(pos.len));//returns the substring of s s o
f length len staring at poston pos (zero is frist postion)
???
[jhuang93@hills ]$ nano reverse.cpp
GNU nano 2.9.8
reverse.cpp
#includes==0s Dof length len staring at poston pos (zerois frist postion)
=s.size();
if(length==0)???? base case
cout
 reverse.cpp: In function 'void displayBackwards(std::string)': reverse.cpp:20:31: error: 'pos' was not declared

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!