Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In C++, where is std::cin object defined?

Tags:

c++

iostream

In C++, the istream object std::cin is declared in header <iostream>, but where is it defined?

like image 474
Nan Ma Avatar asked Sep 10 '13 06:09

Nan Ma


1 Answers

Where it is defined is not mandated by the standard, it's completely up to the implementation.

Here's where mine is:

$ nm -C /usr/local/lib64/libstdc++.so.6 | grep -w cin
0000000000305900 B std::cin
like image 110
CB Bailey Avatar answered Sep 22 '22 15:09

CB Bailey