Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char letra = 'B';
- string palabra = "Esta es una palabra\nEsta es la segundo linea\tque esta ordenada";
- cout <<letra<<endl;
- cout <<"numero de char: "<<int(letra)<<endl;
- cout <<palabra;
- for(int i=int('a'); i <= int('z'); i++)
- cout <<i<<"\t"<<char(i)<<endl;
- cout <<"tamano"<<palabra.size()<<endl;
- cout <<"sólo una parte ["<<palabra.substr(0,16)<<"]"<<endl;
- cout <<"reeplazar ["<<palabra.replace(0,11, "segundo")<<"]"<<endl;
- //busqueda
- cout <<endl<<"npos"<<string::npos<<endl;
- cout <<endl<<"buscando una palabra [linea] :"<<palabra.find("estruct")<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement