you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 year ago (1 child)

Yes. Which frequently leads to complications.

#include <iostream>
using namespace std;

void log(int level) {
    cout << "Logging numeric level: " << level << endl;
}

void log(string message) {
    cout << "Logging message: " << message << endl;
}

int main() {
    log('A');  // Uh oh — which one is this?
}
  • source
  • parent
  • hideshow 1 child comment