Buckys C++ Programming Tutorials - 71 - string Class and string Functions

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 251

  • @xWendzy
    @xWendzy 7 лет назад +237

    legend has it that the milkshake is still stuck in his throat.

    • @cloaky6973
      @cloaky6973 3 года назад +3

      *10 years passes * : .. um sorry guys i still have that milkshake stuck in my throat

  • @Kevin2341
    @Kevin2341 11 лет назад +65

    Your videos are the best C++ tutorials on youtube!

  • @hackzgamezyt
    @hackzgamezyt 3 года назад +9

    10 years old yet the sound quality is better than alot of tutorials in 2021😂😂

  • @oyindaowoeye467
    @oyindaowoeye467 11 лет назад +119

    I've concluded that Bucky is sponsored by McDonald's

  • @AJddfx
    @AJddfx 6 лет назад +22

    Amazing. I've been beating my head against my desk for the past half hour trying to figure out why my program wasn't running even at all. I decide to click on Bucky's tutorials, as I have done many times, and before the video even started, I had my answer. The education system truly amazes me.

    • @abab1247
      @abab1247 3 года назад

      you've been beating your meat against your desk for the past half hour? damn dude.

    • @justine.3416
      @justine.3416 2 года назад

      what

  • @mdlink623
    @mdlink623 3 года назад +3

    8:10 thats something i never thought id hear a youtuber say; thats why we love you bucky

  •  9 лет назад +39

    I love how he mistypes.

  • @AscendedCarrot
    @AscendedCarrot 7 лет назад +98

    bcuky, my hampster thinks tuna sandichwedhd dare good. Thank you.

  • @victoriadathan2675
    @victoriadathan2675 5 лет назад +1

    Yes!! This video helped me out soooo much!!! Thank you from the bottom of my heart. You explained the concept of the getline function successfully. I just debugged a programming issue that I was struggling to solve for an assignment. Debugging is such an important skill in programming, especially for jobs. It is such a great feeling when you debug without anyone standing beside you!! Keep up the great vids and info!!!

  • @michaelzepeda5785
    @michaelzepeda5785 6 лет назад +5

    I got a 100 on my computer science test because you. Thank you so much!

  • @charlestheanimator1676
    @charlestheanimator1676 4 года назад +8

    Bucky I love how much better at teaching you are than my college prof X'D

  • @Ki_kis
    @Ki_kis 11 лет назад +1

    I just wanna thank you for all your videos!! Without them, I'd have no clue how to do C++. Keep them coming!

  • @カラスKarasu
    @カラスKarasu 12 лет назад

    You can also print a character from a string just as you would do with an array. For example:
    string myString = "Hello World!";
    cout

  • @muneebrai7956
    @muneebrai7956 4 года назад +1

    Bucky I bless you with my whole soul!! Man is a saviour

  • @imlolly6707
    @imlolly6707 8 лет назад +15

    20/10 more video's to go! (You was nearly correct, just missed that /10, but hey, no problem!)

  • @jihudumieschool
    @jihudumieschool 10 лет назад +8

    Thanks Bucky!! This is very useful to me!! God bless you!

  • @Alionwheels
    @Alionwheels 2 года назад

    It’s 2022 and it’s 11years ago tutorials helping me today ❤

  • @NeilRoy
    @NeilRoy 10 лет назад +2

    An important note is there is no difference between a string of characters in C++ and in C. It's just that C++ has a string class with many very nice functions to help you easily handle them, but when it boils right down to it. A string is an array of characters, and the reason why they are more difficult to handle than integers or doubles etc... is that computers only deal with numbers. Period. Characters and strings are stored in your system as an array of numbers. Now in C and C++ you can define a *char* type, which is similar to an *int*, no problem, because a *char* is simply a byte sized (0-255 when it is unsigned) number. A string is an array of these characters and in C++ the string class has a slew of very helpful functions etc... to help you better deal with them. I say all t his because someone referred to outputting a c_str() in the last video as a "relic of C" which it is not, there is no difference in how an array of characters in stored in C and in C++ in memory. It's all just numbers in the end.

  • @noobmaster8731
    @noobmaster8731 4 года назад

    Hi. Im from argentina. You video helps me to resolve an exercise. Gracias!

  • @nedgillespie3406
    @nedgillespie3406 4 года назад

    you helped me get through high school and college

  • @cptfryingpan2580
    @cptfryingpan2580 4 года назад +1

    u explained that so easily wow

  • @chiengdorkcy4851
    @chiengdorkcy4851 5 лет назад +1

    Mmmmm..........the man of the globe,programmer.Bucky,keep it in

  • @ScibbieGames
    @ScibbieGames 8 лет назад +5

    Guys. do #include (if on windows obviously)
    And in the for loop. write after the _cout_ function:
    Sleep(50);
    You're welcome

  • @Summayyahh
    @Summayyahh 12 лет назад

    Has anyone ever told you that you are a life saver?

  • @shipumiah2498
    @shipumiah2498 11 лет назад +1

    Great video Tutorial Bucky, it really helped me understands C++. Thank you!

  • @rich618
    @rich618 5 лет назад

    thanks for your success bro i am blessed! your tutorial truly helped me with my C++ homework

  • @sshere16
    @sshere16 5 лет назад +4

    Your video is very old but you teach good than new

  • @craignichols9552
    @craignichols9552 8 лет назад

    One thing that might be worth mentioning, rather than following all of this word for word and re-using cin for each example, if you don't want to comment out cin, do the following.. it'll clear the user input and allow you to take in new characters entered by the user. With c++ you need to clear the cin method before you can use it again in a working program...
    std::cin >> bucky;
    std::cout

  • @decomorells2690
    @decomorells2690 4 года назад +1

    this should of literally been in his first ten tutorial vids rather then last XD

  • @dslink2009
    @dslink2009 13 лет назад

    Wow, you post so many vids!!! You are awesomeness!

  • @abhradeep3283
    @abhradeep3283 10 лет назад +1

    Thank you very much bucky.. this video on strings was very very very usefull it helped me out a lot.

  • @ChristopherJones16
    @ChristopherJones16 9 лет назад +51

    I got a job at google after watching your tutorials! And I'm only 12! I now know twenty different languages .. And I'm just 12. Still crapping my britches... And working at google.

    • @imlolly6707
      @imlolly6707 8 лет назад +33

      +Christopher Jones This seems...very legit xD

    • @NikorasuChan
      @NikorasuChan 8 лет назад +1

      +Christopher Jones
      And I'm just 12

    • @octopuss2345
      @octopuss2345 8 лет назад +2

      that's possible if your mother/father is adopted

    • @bostic8683
      @bostic8683 8 лет назад +20

      WELL SEEMS LEGIT JUST AS LEGIT AS UR PROFILE PIC MUST BE A PIC OF UR DAD

    • @yashsoni501
      @yashsoni501 8 лет назад +26

      Do you celebrate your birthday on 29th Feb?

  • @jaimerhoda5399
    @jaimerhoda5399 10 лет назад +145

    I've determined that you do not know how to spell sandwich.

    • @Vendetta0005
      @Vendetta0005 10 лет назад +5

      tuna sandwichwedhd hahahahahah XDXDXD!!!!!

    • @Adam-cn5ib
      @Adam-cn5ib 7 лет назад +2

      santghitwch?

    • @AL-wc8oy
      @AL-wc8oy 4 года назад +1

      youh do'nt xcare

  • @magsudhajiyev7810
    @magsudhajiyev7810 10 лет назад

    Your explaining is just super!

  • @پروگرامینگبامن
    @پروگرامینگبامن 5 лет назад +2

    i love to hear for always your beautiful SENTENCE (what is going on guys)

  • @razeezar
    @razeezar 7 лет назад +4

    I've been eating tuna sandwiches just over the last week. It only just occurred to me this weekend that it's Bucky's fault

  • @Idieyidot
    @Idieyidot 7 лет назад

    Thank you for this! helped me out a lot :D and i like ur voice btw

  • @Vendetta0005
    @Vendetta0005 9 лет назад +1

    You just got tuna sandichwed in high definition, son!

  • @WW-ph1go
    @WW-ph1go 7 лет назад

    oh my god this helped so MUCH thanks dude

  • @digvijayraut8607
    @digvijayraut8607 5 лет назад +1

    Really good and understood the concept 🤩🤑

  • @TheOrneryNerd
    @TheOrneryNerd 13 лет назад +1

    So, what's the difference between string.size() and string.length() ??

  • @dudecanner
    @dudecanner 13 лет назад

    You are one AWESOME TEACHER!

  • @lbomcarvalho
    @lbomcarvalho 11 лет назад

    Nice nice videos bucky. I also have a question. Why the combination of cin >> bucky1 and getline(cin, bucky2) is kind of tight together on this piece of code below?
    #include
    #include //allow you to use string functions
    using namespace std;
    int main(){
    string bucky1;
    cin >> bucky1;
    cout

  • @techieturk
    @techieturk 6 лет назад +8

    float omgwtf;
    void mcDonalds(haveTuna ,bbqsandmiches)
    cin>>milkshake>>endl;

  • @KazmirRunik
    @KazmirRunik 9 лет назад +6

    Only "like 20 more videos" to go~

  • @FingersBlazin
    @FingersBlazin 8 лет назад +1

    I'm wondering, why would one decide not to use namespace std? Is there any advantage for not using it?

    • @zexkanter9688
      @zexkanter9688 7 лет назад

      old school

    • @namelessbrown
      @namelessbrown 5 лет назад

      I think its because without it makes the program run faster or something like that.

  • @rbsupercool
    @rbsupercool 11 лет назад +1

    **TUNA** is the most used term in bucky's life!! :)

  • @exxavectragnm2938
    @exxavectragnm2938 7 лет назад

    Thanks bucky, your tutorials are so helpfull

  • @puffbluesam021
    @puffbluesam021 10 лет назад

    Thank you so much Sir Bucky!!!

  • @abab1247
    @abab1247 3 года назад

    6:06 was he tryna spell "hampster" like that? or was he tryna spell "hamster" like the animal?

  • @shamimsarker6230
    @shamimsarker6230 6 лет назад

    Very useful Video,, :) :) :) Love from #Bangladesh..

  • @kite1160
    @kite1160 8 лет назад

    Finished series.. Where do I go to keep learning more such as struct etc..

    • @DanTutorialsChannel
      @DanTutorialsChannel 8 лет назад +1

      I have a few tuts on structs on my channel if you are looking for some info, I don't have much but better than nothing ?

  • @princesinday6570
    @princesinday6570 9 лет назад

    Hi, are you using the codeblocks program?
    Because the code is not running or is there something i need to do?
    BTW i am a newbie and studying c++

  • @jharris3729
    @jharris3729 7 лет назад

    Very nice tutorial! Thanks

  • @Dimitrios1738
    @Dimitrios1738 11 лет назад

    Nice tutorial butI have a question, i haven't included the string header file but i can still use the getLine() function... why?

    • @salimahmedali9249
      @salimahmedali9249 11 лет назад

      If you've used a library function that you haven't declared, your compiler implicitly does it....accompanied with a lil warning at times. Hope this helped.

    • @seandewar
      @seandewar 10 лет назад

      Salim Ahmed Ali Actually, it's because the header includes some functions and objects from the header for its own class and function template code and et cetera. It's still better to include explicitly, however.

  • @maheraalani719
    @maheraalani719 10 лет назад

    How to find the documentary of the string class to read about the functions ?

  • @lijasssss
    @lijasssss 13 лет назад

    You know that you dont have to use brackets if you only have one statement after the for, while and if, right?

  • @rafaellalinde3154
    @rafaellalinde3154 7 лет назад

    You the man Bucky!!

  • @Qazqi
    @Qazqi 12 лет назад

    Sometimes headers are included in other headers. In this case, it's probably included in iostream somewhere. However, you cannot count on this behaviour. You should include what you need.

  • @dragons10000
    @dragons10000 13 лет назад

    @Mrjohnchannel thanks mate. Happy new year

  • @peichen3332
    @peichen3332 9 лет назад

    Thank you sir, helps a lot.

  • @GHAI007
    @GHAI007 11 лет назад

    hi bucky, can you please tell me where I can find good tutorials for STL .I am looking for basic ones not 1000 pages book.
    Thanks

  • @pbrocket296GT3
    @pbrocket296GT3 7 лет назад

    thank you! :) i have a question, how do you terminate and exit a program if the same value of cin was entered as input?

  • @AnujSharma142
    @AnujSharma142 12 лет назад

    ANY HELP????
    i just don't get the drop down as you get
    like when you type s3.assign
    so thr is no drop down in my codeblocks.. m usind 10.05 version

  • @CloudCreative
    @CloudCreative 7 лет назад

    what kind of IDE and compiler you use under Windows? :)

  • @alejoxsantana
    @alejoxsantana 4 года назад

    That milkshake do be thick doe 🤣

  • @Reddragonkilla
    @Reddragonkilla 11 лет назад

    Bucky your videos are amazing no doubt but could you make about 130 more of these on various things that aren't covered? :) Thanks

  • @pandacutiesuperstar
    @pandacutiesuperstar 6 лет назад

    how would I add an array of strings along with a cin in a class?

  • @guilhermesalome
    @guilhermesalome 13 лет назад +1

    "woohohooow easy caps lock"
    ASHEUASHUEUHSAEUH
    his comments are always funny

  • @Qazqi
    @Qazqi 12 лет назад

    Do you mean apstring as in the one used in AP exams? They're quite different.

  • @jrM5492
    @jrM5492 6 лет назад

    is getline (); a built-in function that can be recognized by c++?

  • @omarsameh7049
    @omarsameh7049 9 лет назад

    Hi, what about if i wanna do string function that tells me if the password is valid or not for example the password should have at least 8 characters and and the password should consists of only letters and digits and the password should contain at least 2 two digits??
    Please help cuz I'm so confused
    Best regards

  • @tarunbalaguru2398
    @tarunbalaguru2398 8 лет назад

    Bro!!!! You rock....

  • @scavengerno1
    @scavengerno1 8 лет назад

    What IDE do you use? Do you have a tutorial on how to install it?

    • @RaRapidum
      @RaRapidum 8 лет назад +1

      +Mohsin Azmi codeblocks, watch his first video in this series or simply google it

  • @techsmith909
    @techsmith909 5 лет назад

    It is a very good tutorial..........!

  • @williamrolandhernando8605
    @williamrolandhernando8605 11 лет назад

    You teach people in a friendly way... cooll...

  • @poseidenjp1496
    @poseidenjp1496 12 лет назад

    i am usig code:: blocks and i didn't include the string class but all the functions worked??

  • @tabrayspasha5252
    @tabrayspasha5252 5 лет назад

    the whole video i was thinking about that Milk Shake he had before XD

  • @CmdrGates
    @CmdrGates 9 лет назад

    I wanted to create an output file that contains spaces i.e. (John W. Smith) and be able to read that file along with other data types (John W. Smith 54 Gun Owner ...). I tried using getline() but it only worked for the first entry inside of my while loop. Any help that you guys can give me would be GREAT !

  • @errr-iw4lz
    @errr-iw4lz 5 лет назад

    a string is different than an array of characters in that they have no set length

  • @annisa5213
    @annisa5213 4 года назад

    cant even focused on watching the whole tutorial cos i keep laughing every few seconds bc i was reading the comment first before watching the video

  • @lizaaslamchaudhry531
    @lizaaslamchaudhry531 5 лет назад

    So here I'm after 8 years, thinking that I'm too late. World has already gone through this!

  • @sterlingkxz
    @sterlingkxz 12 лет назад

    I love your shameless typos

  • @kashishgupta5125
    @kashishgupta5125 8 лет назад

    plz help me with this :
    create a function to accept 2strings and return status whether are identical or not:

    • @pradyumnkejriwal3007
      @pradyumnkejriwal3007 7 лет назад +3

      kashish gupta
      bool functionName( string a, string b) {
      if(a == b) {
      return true;
      else {
      return false
      }

  • @FrivolousMatter
    @FrivolousMatter 10 лет назад +1

    I dont know if its just my computer acting weird or what but there is something weird with the getline function...someone please explain this:
    code: (i have all the headers needed)
    string name;
    cin >> name;
    cout

    • @goddybrown7598
      @goddybrown7598 9 лет назад

      ***** try it in this order : it works for me :D
      #include
      #include//gives string functions
      using namespace std;
      int main()
      {
      string line;
      getline(cin, line);
      cout

    • @goddybrown7598
      @goddybrown7598 9 лет назад

      ***** FROM MY OWN UNDERSTANDING OF WHATS HAPPENING, WHEN YOU ENTER THE VALUE OF THE FIRST STRING VARIABLE, THE COMPILER IS GOIING TO READ AND STOP @ THE FIRST WHITE SPACE AND ANY WORD COMING AFTER THE COMPILER IS GOING TO ASSIGN (by assuming) IT TO THE getlin() for example:::::
      #include
      #include//gives string functions
      using namespace std;
      int main()
      {
      string name;
      cin >> name;
      cout

    • @dipsyteletubbie802
      @dipsyteletubbie802 7 лет назад +1

      +friendOfTheWinds
      I'm more than 2 years late, but for anyone else:
      add cin.ignore(); before getline(cin, line); now it will work

  • @MrMotionshooter
    @MrMotionshooter 9 лет назад

    Hi
    Is there a way to send event to event hub using cpp

  • @lambingsilog
    @lambingsilog 5 лет назад

    How to fix 'was not declared in the scope'

  • @giladin1
    @giladin1 9 лет назад

    thanks!
    How can i replace a char in a string with some kind of variable?
    example: "my name is Gil"
    i want to print "m* nam* i* gi*"------can you help

  • @fahadashrafofficial
    @fahadashrafofficial 6 лет назад +1

    Hold on guys! only 2 tutorials left =D

  • @travelwithpraveen6591
    @travelwithpraveen6591 6 лет назад

    bro, any videos on linked list

  • @giladin1
    @giladin1 9 лет назад

    please!
    How can i replace a char in a string with some kind of variable?
    example: "my name is Gil"
    i want to print "m* nam* i* gi*"------can you help
    replace?resize?

    • @CycloneAce20
      @CycloneAce20 9 лет назад

      ***** string name = "Alin";
      name.at(0)= '*';
      cout

  • @ijustwantapc1542
    @ijustwantapc1542 5 лет назад

    what is the bucky for?

  • @ahmmedisthebest
    @ahmmedisthebest 10 лет назад

    thanks,from egypt

  • @AhmedHadiPADI_scuba_instructor
    @AhmedHadiPADI_scuba_instructor 8 лет назад

    what do i need if i wanted to implement my own String class ?

    • @5h1f7
      @5h1f7 7 лет назад

      electricity, a pc(with OS) , a keyboard(or a mouse), minimum 1 finger, eyes and a brain

    • @AhmedHadiPADI_scuba_instructor
      @AhmedHadiPADI_scuba_instructor 7 лет назад

      Pulver Paul Pulver Paul seems smart😍 dont u think i need you too cause i have everything you've mentioned as well as a condom that u'll like 👌

    • @5h1f7
      @5h1f7 7 лет назад

      *insert noice* :D

    • @dhlehrenlos
      @dhlehrenlos 7 лет назад

      pff i am using a stick and my mouth to write

  • @ishrakkhan22
    @ishrakkhan22 12 лет назад

    hey what about linked list and trees

  • @dawnbugay7094
    @dawnbugay7094 7 лет назад

    Is this will wprk in turbo c?

  • @saidhoni777
    @saidhoni777 4 года назад

    really love yada yada yada......

  • @Omeomeom
    @Omeomeom 8 лет назад +5

    I came when he coughed

  • @memz7435
    @memz7435 8 лет назад

    Are u not tired of making 20 tutorials per day Bucky????

  • @TonyTxT
    @TonyTxT 4 года назад

    he sponsored tuna sandwiches from Mcdonalds in the whole video