C++ arrays explained 🚗

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 29

  • @BroCodez
    @BroCodez  Před 2 lety +10

    #include
    int main()
    {
    std::string cars[3] = {"Corvette", "Mustang", "Camry"};
    std::cout

  • @artemzakharchuk2842
    @artemzakharchuk2842 Před 10 měsíci +9

    #include
    using namespace std;
    int main() {
    string names[8] = {"Artem", "Eva", "Yula", "Polina", "Lesha", "Bogdan", "Nikita", " Dima"};
    cout

    • @albertomecanicaslocassergio
      @albertomecanicaslocassergio Před 8 měsíci +2

      It's a good start, but you can reduce the amount of lines doing:
      #include
      using namespace std;
      int main() {
      string names[] = {"Artem", "Eva", "Yula", "Polina", "Lesha", "Bogdan", "Nikita", "Dima"};
      for(std::string name : names){
      cout

  • @zakmartin7567
    @zakmartin7567 Před 2 lety +7

    Heck yes. Keep these updated vids coming pls. My C++ term starts next week :3

  • @FrederikWollert
    @FrederikWollert Před 5 měsíci +1

    I really like your C++ series. Keep it up. Please make more C++ Videos. So, let's defeat the CZcams algorithm.

  • @Rashed_16
    @Rashed_16 Před měsícem +9

    someone tells him about using namespace std;

    • @theday56
      @theday56 Před měsícem +1

      he mentioned in another vid why he doesnt use it but i dont remember

    • @Rashed_16
      @Rashed_16 Před měsícem

      @@theday56 oh okay

    • @Lokvie
      @Lokvie Před 10 dny

      It might be useful for some projects, but it is a bad practice.
      It makes the code harder to read for others and also makes it harder for you to write when you have to work on someone elses project, that doesn't use ''namespace std;''

  • @AnimateIt2BauBau
    @AnimateIt2BauBau Před rokem

    The edit at 5:18 was so smooth

  • @criminalx7099
    @criminalx7099 Před 2 lety +7

    string bikes[2];
    cout

    • @panxel8615
      @panxel8615 Před 8 měsíci +1

      you can do sizeof(bikes). it returns the length of the array, in this case 3

  • @tavares._art
    @tavares._art Před 8 měsíci +1

    using namespace std
    int main() {
    int shoeSize [6] = { 33, 35, 37, 39, 41, 43}
    cout shoeSize

  • @yahyaarfaoui8526
    @yahyaarfaoui8526 Před rokem

    Array[ "good job"];

  • @whathuh6965
    @whathuh6965 Před měsícem

    string Brands[] ={Nike, Adidas, Puma, Fila,}
    if(Condition ==true)
    {
    Brands[0] = "Sketchers";
    }

  • @abidaismail8539
    @abidaismail8539 Před 2 měsíci

    Sir zoom out the screen

  • @MuzoGonViral
    @MuzoGonViral Před měsícem +1

    #include
    #include
    using namespace std;
    int main()
    {
    string car[]={"toyota, Nissan,isuzu"};
    cout

  • @wlsedlacek
    @wlsedlacek Před rokem

    double car[] = {1.99, 4.57, 19.99, 100};
    std::cout

  • @oximas-oe9vf
    @oximas-oe9vf Před rokem

    what would happen if you try putting accessing an element out side the array in c++
    i.e.(std::cout

    • @FlorrioEggGaming
      @FlorrioEggGaming Před rokem +1

      uhh that shouldn't even happen ,you are only meant to get a warning that this value doesn't exist

    • @MindOfT1m
      @MindOfT1m Před 2 měsíci +1

      yeah wtf 🤣

  • @parpaperchimp
    @parpaperchimp Před 6 měsíci

    #include
    int main (){
    int pizza = 1;
    int neutral = 2;
    int choise;
    Std::string neutralmenu[]= {“meat”, “pasta”,”bread”}
    pizzamenu[]={“margherita”,”marinara”,”capricciosa”};
    std::string
    std::cout

  • @matheus1766
    @matheus1766 Před rokem +2

    #include
    int main()
    {
    std::string colors[] = {"Red", "Blue", "Yellow", "Pink", "Black", "Gray", "Green"};
    std::cout

  • @ancientastronauttheorists

    #include
    using namespace std;
    int main()
    {
    double prices[] = {3.40 , 4.33, 22.50};
    prices[0] = 30;
    cout