C++ user defined functions explained 📞

แชร์
ฝัง

ความคิดเห็น • 17

  • @BroCodez
    @BroCodez  2 ปีที่แล้ว +9

    #include
    void happyBirthday(std::string name, int age);
    int main()
    {
    // function = a block of reusable code
    std::string name = "Bro";
    int age = 21;
    happyBirthday(name, age);
    return 0;
    }
    void happyBirthday(std::string name, int age){
    std::cout

  • @tanvirsahrierjishan778
    @tanvirsahrierjishan778 24 วันที่ผ่านมา

    is any good to use functions below main?

  • @FrederikWollert
    @FrederikWollert 3 หลายเดือนก่อน +1

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

  • @memezilla2964
    @memezilla2964 2 หลายเดือนก่อน

    what is void?

  • @taigo5766
    @taigo5766 2 ปีที่แล้ว +10

    finally, hello world v2.0
    #include
    void hello(std::string world);
    int main()
    {
    std::string world = "Hello, World!";
    hello(world);
    return 0;
    }
    void hello(std::string world)
    {
    std::cout

    • @rivazmardani
      @rivazmardani 2 ปีที่แล้ว

      good tiigao chan

    • @Yureki
      @Yureki 2 ปีที่แล้ว

      @@rivazmardani *chan =}}}

  • @sviatoidyx4672
    @sviatoidyx4672 2 หลายเดือนก่อน

    }
    void find_x(double a, double b, double c ){
    double x1;
    double x2;
    double D = pow(b,2) - 4*a*c;
    if (D>0){
    x1=(-b+sqrt(D))/2*a;
    x2=(-b-sqrt(D))/2*a;
    std::cout

  • @artemzakharchuk2842
    @artemzakharchuk2842 9 หลายเดือนก่อน

    #include
    using namespace std;
    void happyBoy(bool IsHappy, string name);
    int main() {
    bool IsHappy = true;
    string name = "Andrew";
    happyBoy(IsHappy, name);
    return 0;
    }
    void happyBoy(bool IsHappy, string name);
    cout

  • @jawneigh_ow
    @jawneigh_ow 2 หลายเดือนก่อน

    Simple weight calculator. - Pretty efficient.
    #include
    void weightCalc() {
    int mass ;
    double weight ;
    std::cout mass;
    std::cout

  • @christiangaming3276
    @christiangaming3276 7 หลายเดือนก่อน

    #include
    void song(int age = 19, std::string Name = "Christian") {
    std::cout