Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
append() in String Class in CPP of Programming in CPP
2353 Views
Usage 
The append function is used to add extra string to end of the statement.
Syntax 
str.append(string);
Example
#include <iostream>

int main ()
{
  std::string str;

  str.append("welcome");                      
  str.append("to");                  
  str.append("CPP");         
  std::cout << str << '\n';
  return 0;
}
Output 
welcome to CPP
Next Topics
Next lessons of current book.
String Class in CPP of Programming in CPP
String Class in CPP of Programming in CPP
String Class in CPP of Programming in CPP
String Class in CPP of Programming in CPP
Previous Topics
Previous lessons of current book.
Classes and Objects in CPP of Programming in CPP
Classes and Objects in CPP of Programming in CPP
Classes and Objects in CPP of Programming in CPP
Math Library Functions of Programming in CPP
Math Library Functions of Programming in CPP
Best Lessons of "Programming in CPP"
Top lessons which are viewed more times.
String Class in CPP of Programming in CPP
Math Library Functions of Programming in CPP
String Class in CPP of Programming in CPP
Classes and Objects in CPP of Programming in CPP
User-defined Functions of Programming in CPP
Math Library Functions of Programming in CPP
String Class in CPP of Programming in CPP
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details