0

I did some code and found that getline() compiles without std:: namespace.

How this work? Is it because C function getline() ?

Here is example code:

#include <string>
#include <iostream>

int main(){
    std::string s;
    getline(std::cin, s);
}
Nick
  • 9,962
  • 4
  • 42
  • 80

0 Answers0