• whiwake@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    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?
    }