C++ Programming Tutorial 58 – Range Based For Loop

Python Bootcamp – https://www.codebreakthrough.com/python-bootcamp

💯 FREE Courses (100+ hours) – https://calcur.tech/all-in-ones
🐍 Python Course – https://calcur.tech/python-courses

✅ Data Structures & Algorithms – https://calcur.tech/dsa-youtube

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

✉️ Newsletter – https://calcur.tech/newsletter
📸 Instagram – https://www.instagram.com/CalebCurry
🐦 Twitter – https://twitter.com/calebCurry
🔗 LinkedIn – https://www.linkedin.com/in/calebcurry
▶️ Subscribe – http://calcur.tech/subscribe
👨🏻‍🎓 Courses – https://www.codebreakthrough.com

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

↪ My Amazon Store – https://www.amazon.com/shop/calebcurry
🅿 Patreon – http://calcur.tech/patreon-calebcurry
🅖 GitHub Sponsors – https://github.com/sponsors/CalebCurry
Ⓟ Paypal – http://paypal.me/calcur

🅑 Bitcoin – 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth – 0x350139af84b60d075a3a0379716040b63f6D3853
📈 Buy Bitcoin – https://calcur.tech/crypto
Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code “Caleb”) – https://calcur.tech/crypto

source by Caleb Curry

c++ programming

Mourad ELGORMA

Mourad ELGORMA

Fondateur de summarynetworks, passionné des nouvelles technologies et des métiers de Réseautique , Master en réseaux et système de télécommunications. ,j’ai affaire à Pascal, Delphi, Java, MATLAB, php …Connaissance du protocole TCP / IP, des applications Ethernet, des WLAN …Planification, installation et dépannage de problèmes de réseau informatique……Installez, configurez et dépannez les périphériques Cisco IOS. Surveillez les performances du réseau et isolez les défaillances du réseau. VLANs, protocoles de routage (RIPv2, EIGRP, OSPF.)…..Manipuler des systèmes embarqués (matériel et logiciel ex: Beaglebone Black)…Linux (Ubuntu, kali, serveur Mandriva Fedora, …). Microsoft (Windows, Windows Server 2003). ……Paquet tracer, GNS3, VMware Workstation, Virtual Box, Filezilla (client / serveur), EasyPhp, serveur Wamp,Le système de gestion WORDPRESS………Installation des caméras de surveillance ( technologie hikvision DVR………..). ,

19 réflexions sur “C++ Programming Tutorial 58 – Range Based For Loop

  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    You can specify in the arguments of the function that you are passing a vector or array type like (std::vector<int> data) for use with the forange loop, in othe case you can also do (std::array<int, size> data) and you will also iterate with forange. I know the last example explanation is worthless because thats the point, not sending the size of an array by arguments, but I just want to show that it can be happen!. Thank Caleb! awesome videos I follow you everytime you upload a new video! Keep it going bro! I laught and enjoy every video!! thank you for all the patience and effort you put in to make those tutorials.. I'm from Paraguay by the way!! And I a cpp lover hahaha

    Répondre
  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    for someone coming from a python background, c++ is so easy to understand.

    Répondre
  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    This one was hugely helpful. I tried putting it into a function with a vector instead of an array and it worked! You are the best!!!!

    Répondre
  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    Hi Calab, in the last part when you try to call the basic C-style array, i cannot see how and where is the function test() is called because test() is not in `int main` anywhere…

    Répondre
  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    You can get the array printing function to work by dereferencing the pointer by changing void test(int data[]) to
    void test(int (&data)[size]) but yeah, you gotta specify how big should the dereferenced array be, which takes the whole advantage of ranged based loops, but who cares? who got it to work didn't we? 😛

    Répondre
  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    This helped me a lot! For loops are so confusing for me because of the variations I see of it. There’s no specific way to do it which is frustrating 😂

    Répondre
  • Avatar
    avril 24, 2021 à 10:30
    Permalien

    Thank you so much. I'm just a few weeks into my self teaching and I was so utterly confused at the syntax and descriptions others have provided on this.
    You fixed it for me. 👍

    Répondre

Laisser un commentaire