calculating execution time in c++

后端 未结 6 556
庸人自扰
庸人自扰 2020-12-22 19:26

I have written a c++ program , I want to know how to calculate the time taken for execution so I won\'t exceed the time limit.

#include

usin         


        
6条回答
  •  太阳男子
    2020-12-22 20:10

    Note: the question was originally about compilation time, but later it turned out that the OP really meant execution time. But maybe this answer will still be useful for someone.

    For Visual Studio: go to Tools / Options / Projects and Solutions / VC++ Project Settings and set Build Timing option to 'yes'. After that the time of every build will be displayed in the Output window.

提交回复
热议问题