I’m using VC++ to disassemble a very simple program I’ve written:
#include <iostream>
using namespace std;
int main()
{
for(int i = 0; i < 11; i++)
{
cout << i << endl;
}
return 0;
}
I was hoping to shed some light on how cout works, but upon inspection, the resulting ASM points to an external source (I assume):
EXTRN __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A
Is there a way to identify, from the above line, where specifically this points to, and how to access it? Even still, how to read the above line?
You don’t have to disassemble that. The MS sources of the streams are part of Visual Studio installation. See: “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src”