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
  • 8,953
  • 3
  • 39
  • 69

0 Answers0