Learn C++ With Me #13 - Strings

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 31

  • @sakshamdogra
    @sakshamdogra 3 роки тому +12

    Tim you are doing so much for the people who want to learn coding and get better grades/ job. Thank you Tim.

  • @user-sy3ny1sz2w
    @user-sy3ny1sz2w 3 роки тому +10

    I just wanna point out that "string" or "std::string" is just a class. You can make "C-Style String" using "const char[]" or "const char*". So in minute 1:44 you get "Invalid conversion from const char* to ..." because if you're using double quotes the actual type is "const char[]" or "const char*".
    So you can declare a string like:
    const char* str = "Hello";
    So what's the difference between "string" or "std::string" and "const char[]" or "const char*"? As I said before "string" or "std::string" is just a class and has various methods to help us to deal with strings but the actual type of the string is "const char[]" or "const char*". But "const char[]" or "const char*" is just a type and doesn't have a methods because it's not a class.

  • @CollosalTrollge
    @CollosalTrollge 3 роки тому +1

    Man u are incredibly clued with so much man, well done.

  • @cmnbellavista6911
    @cmnbellavista6911 3 роки тому

    5 or 10 min tops tutorials are best. Thanks.

  • @mastershooter64
    @mastershooter64 3 роки тому +6

    Hey Tim can you please continue the series up to SIMD programming??

  • @michaelsilvers1260
    @michaelsilvers1260 8 місяців тому

    Interestingly, I didn't need to use the size() or .length function. When watching your videos, you always describe what you're about to do before writing the code, and I pause it and try to do it myself first because I don't want to be stuck in tutorial hell and its my way of making sure i understand fully. But, at first what I tried was in fact the array method with sizeof(stringvariable) / sizeof(stringvariable[0]) which interestingly worked, BUT crashed my program after returning the string. So, instead out of curiousity I wondered if I could just use the number of characters in the string and just tried that. Mine was simply "hey", so I did i < 3; and this worked fine. I assume its because of one of my headers or streams? using namespace std, iostream, and (I like using the Sleep() function). Either that, or maybe visual studio is just newer and has things implemented to make it easier.

  • @blackpeppercinnamon3244
    @blackpeppercinnamon3244 3 роки тому +1

    Hello Tim great video! Can you do a video on the header iomanip? Itd be very helpful

  • @jakub7321
    @jakub7321 3 роки тому +7

    Tim, could you not "using namespace std;"? It is concidered bad practice, because it defeats the purpose of namespaces which is to avoid naming conflicts. You would be surprised how many things are in that namespace.

    • @jakub7321
      @jakub7321 3 роки тому

      No beef, great tutorial!

    • @jakub7321
      @jakub7321 3 роки тому +2

      Also, double quotes are NOT strings, they are arrays of characters. (const char[]/const char*)

  • @abrarmasumabir3809
    @abrarmasumabir3809 3 роки тому

    bro you are awesome ....! plz cover literally everyting in c++ and also make some project videos

  • @dimasveliz6745
    @dimasveliz6745 3 роки тому +1

    This firsr phrase you said got me in: you can access and modify string characters... I was like what??? Strings were supposed to be immutable in many programming languages 😕
    And so, I continue watching cuz TIL

  • @yourdadsbestfriend7101
    @yourdadsbestfriend7101 3 роки тому

    tim these are amazing

  • @bekhruzniyazov6600
    @bekhruzniyazov6600 3 роки тому

    will you make a video on your new mac setup?

  • @waqaspathan3337
    @waqaspathan3337 3 роки тому +1

    Tim can u please make a series on 3D modeling in python

  • @shyamroy1663
    @shyamroy1663 3 роки тому

    Great understanding

  • @alopmemes1964
    @alopmemes1964 3 роки тому +1

    Tim? One question: If you learned us c++, can you make an OpenGL tutorial with C or C++. Like you know for the intermediate stuff? :D Would be absolutely gorgeous!

  • @uttkarshpathak2904
    @uttkarshpathak2904 3 роки тому

    I am getting an error in my computer , Entry point not found could not locate in the dynamic link library !
    plz help

  • @muhammadanas7698
    @muhammadanas7698 3 роки тому

    First Comment
    Can you make a new playlist on Java please or maybe an android development playlist

  • @RubiksCoder
    @RubiksCoder 3 роки тому

    OMG first view!!!!!!!!!!!!!!!!!!!!!

  • @edwardedward7765
    @edwardedward7765 3 роки тому

    Hello Tim, how are you ? :-)

  • @shivamtank4101
    @shivamtank4101 3 роки тому +1

    C++

  • @CYBER_JUSTICE
    @CYBER_JUSTICE 3 роки тому +1

    Y U Suddenly Started Learning C++?

  • @twitchlegan19
    @twitchlegan19 3 роки тому

    Can a c++ pro help me w something

  • @stefanarctic1966
    @stefanarctic1966 3 роки тому +1

    Lol

  • @ronit.dhingra_
    @ronit.dhingra_ 3 роки тому +1

    second lol

  • @ananthramvijayaraj4554
    @ananthramvijayaraj4554 3 роки тому +1

    First

  • @redoansaleh
    @redoansaleh 3 роки тому

    550th lol