C++ Programming Tutorial 26 - String Modifier Methods

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

You're amazing dude, you make learning all this so much easier

technocuber
Автор

Ah, the replace method for censoring swear words, also known as the Scunthorpe problem XD. Seriously though, awesome video man, learning a lot from your series.

CelynBrum
Автор

I really enjoyed this video (and all of your videos), and I'm about to pop back another one!

PunmasterSTP
Автор

What if you wanted to append a string using cin? For example you had "Hello there" as the defined string. But what if you wanted to allow the user to add text like "sir" to the string so that on the next call it would output altogether "Hello there sir"? I can't find anything online that shows how to do this?

bobbywardle
Автор

Awsome video! Why not use using namespace std;? just wonderting

mateoesteve
Автор

6:53 why is there 4 after 9?? I dont gett itttt

svnspell
Автор

Does anyone know how to fix this error: [Error] 'std::string' has no member named 'pop_back'

ridhofachrurrozy
Автор

whats number 4 in the replace argument?

togurosensei
Автор

||=== Build file: "no target" in "no project" (compiler: unknown) ===|
E:\Code \..cpp\Untitled2.cpp||In function 'int main()':|
'std::__cxx11::string {aka class has no member named 'pop_back'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| this is the error I am gating for using pop_back !!!

stephenprofullobala
Автор

don't know why when i use this exact code it doesn't work I've double checked it so many times it has no errors and it just simply won't print anything, I have tested cout from somebody else and it is working

This is what I wrote:

#include <iostream>
#include <string>

using namespace std;

int main()
{
string greeting = "What the heck?";
greeting.pop_back();
greeting.replace(9, 4, "****");
cout << greeting << endl;
}

qiveal
Автор

Thank you, funny guy. Though I learned for free, sorry.

datpham
Автор

He just loves that bad word "he__"

technocuber
Автор

I guess I'm doing something wrong, but I'm not quite sure what. I'm just trying to follow your video and put in greeting.erase(3, " "); but I'm getting error: no matching member function for call to 'erase'


and "greeting.erase" is underlined with green squigglies with a lil up arrow on the e


Help me Caleb, you're my only hope..

kdtallllll
Автор

Your video are good.. But you should have used isostream.. But you video are good

Banele
visit shbcf.ru