Arguments and functions

do I have to pass an argument to a function in order to get back something from that function?

Not necessarily ...
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>

int noArgs()
{
    return 42;
}

int main()
{
    std::cout << noArgs() << "\n";

}
Topic archived. No new replies allowed.