int _tmain(int a...">

Debug file pane in Visual Studio

In Visual Studio 2012, I have this simple C ++ program:

#include "stdafx.h" #include <iostream> int _tmain(int argc, _TCHAR* argv[]) { std::cout << std::cout; int i = 1; return 0; } 

In case you are interested, the part "std :: cout <std :: cout" is intended only to show that std: cout can be obtained as part of the function - yes, that meant printing a pointer to the console.

So, I set a breakpoint in "int i = 1". When the breakpoint trigger is triggered, I want to check std :: cout from the command window (or the immediate window), so I print:

> Debug.Print std :: cout

But it returns the following error:

Identifier "std" undefined

I do not understand why this is happening, std should be in the scope of the function being executed. The same goes for any other material coming from the #include directive, I just can't check it with Debug.Print. What do I use in Visual Studio 2012 to test EVERYTHING available at runtime? It seems I can only access local variables using Debug.Print.

+4
source share

Source: https://habr.com/ru/post/1443138/


All Articles