Results 1 to 2 of 2

Thread: C++ help fast

  1. #1
    New User
    Join Date
    Aug 2012
    Location
    macedonian
    Age
    29
    Posts
    1

    C++ help fast

    One function, with arguments, another one without arguments, and one of em with a call by reference

    And the third one, overloading of functions
    #include <iostream>
    using namespace std;

    int zgolemi(int a, int b)
    {
    return a+b;
    }

    int zgolemi(int a)
    {
    return a+1;
    }

    double zgolemi(double a, double b)
    {
    return a+b;
    }

    double zgolemi(double a)
    {
    return a+1;
    }

    int main()
    {
    cout << zgolemi(2, 3) << endl; //se povikuva zgolemi(int a, int b)
    cout << zgolemi(5, 9) << endl; //se povikuva zgolemi(int a, int b)
    cout << zgolemi(3) << endl; //se povikuva zgolemi(int a)

    cout << zgolemi(3.0, 0.5) << endl; //se povikuva zgolemi(double a, double b)
    cout << zgolemi(4.1, 2.9) << endl; //se povikuva zgolemi(double a, double b)
    cout << zgolemi(2.0) << endl; //se povikuva zgolemi(double a)

    return 0; someting like this this is whit overloading of functions ..

  2. #2
    Administrator Cen's Avatar
    Join Date
    Sep 2006
    Location
    Slovenia
    Age
    32
    Posts
    15,685
    Blog Entries
    2
    What exactly is your problem???

    Undefeated Mad Balls Arena champion

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Affiliates