Как зарегистрировать материал в консоли в C++ Visual Studio

Я понял это ...

def index(request):

    if 'symbol' in request.GET:
        symbol = request.GET.get('symbol',' None')
        request.session['symbol'] = symbol

    else:
        symbol = request.session['symbol']
12
задан Korbi 3 May 2009 в 19:18
поделиться

7 ответов

Use function OutputDebugString from Windows API. You can call it anytime you want e.g. every 100th loop in your code.

Function info is here

Please read all comments on this page - some people claim that in your IDE (VS2008) output of this function is shown in "Immediate Window" not the "Output".

11
ответ дан 2 December 2019 в 19:32
поделиться

You can set conditional breakpoints, i.e. breakpoints which hit at a certain position only when a given expression is true. You can, for example, set a breakpoint which hits only every nth time in a loop.

2
ответ дан 2 December 2019 в 19:32
поделиться

you can use a simple output to the console.

say you want to display an integer, you can simply use printf for example:

printf("the number is %d \n", vectorArray.at(place) );
2
ответ дан 2 December 2019 в 19:32
поделиться

You can also set your breakpoint inside a piece of conditional code, e.g.:

if(keyPressed('S'))
{
  int a = 42; // <-- set breakpoint here
}

The pro vs a conditional breakpoint is that the condition can be a bit more complex, the con is that each time you need to change the condition, you need to compile and link your app.

1
ответ дан 2 December 2019 в 19:32
поделиться

Along with conditional breakpoints you can also have the breakpoint write the vector values to the console and not stop.

Right click on your breakpoint and select "When Hit" click "print a message" and then add your values to the message in curly braces. Use the "Hit Count" to have the breakpoint execute after so many cycles. The "Condition" option is also useful for setting the breakpoint dependent on a certain value in your variables.

1
ответ дан 2 December 2019 в 19:32
поделиться

Setup an elapsed timer and something extremely basic.

if elapsedTime > 3 seconds: hits your break point, check out your vector

Or if you want to stop on a very specific point, just flag a counter to keep track of how many frames you've done.

1
ответ дан 2 December 2019 в 19:32
поделиться

i found out that if you include and use fprintf(stdout,"")

it returns a command prompt on the screen while your program is still running

0
ответ дан 2 December 2019 в 19:32
поделиться
Другие вопросы по тегам:

Похожие вопросы: