0
#include<iostream>
void f(int a, int b = 2, int c = 3);
int main() {
    f(4);
    //f(4,,5); How can I use second arg by default, with non default third argue?
}
void f(int a, int b ,int c) {
    std::cout << a << '\n' << b << '\n' << c << '\n';
}

How can I use non-last arg by default, with other non default argue, in c or c++?

MikeCAT
  • 73,922
  • 11
  • 45
  • 70
sunkue
  • 278
  • 1
  • 9

0 Answers0