2 questions :: VC++ profiler, howto? :: Is " " == '\n'?

Started by
2 comments, last by BauerGL 21 years, 11 months ago
Hi I need some answers on two unrelated topics. 1. How does the MSVC++ profiler work? I know what it does etc, but how can do I set it up, run it etc? I have searched the MSDN but I do not understand exactly how to do it. So any tips where to find information about what to do, or some straight help would be really appreciated. 2. Kinda strange question, but I wonder if a space " " is considered to be a newline mark ''\n'' when reading from file. For example if I do this: ifstream fin("config.cfg"); fin.ignore(100, ''\n''); Would it ignore 100 chars or until the first space "letter"? Or will it ignore 100 chars or until the first newline (return)? Thanks for reading, and hopefully helping. CUselessStuff::NiftyQuote();

@mikaelbauer

Super Sportmatchen - A retro multiplayer competitive sports game project!

Advertisement
Reply to Question 1:
First of all, compile and link your program, and check that it works ok.
Then, to run the profiler, just select "Profile" from the "Build" menu
If an alert appears that tells you that your project isn''t up to date or built with profiling enabled, then just select Project->Settings->Link Tab and check the box "Enable Profiling".

When you start the profiling, a window will come up to let you select some options. If you want to see how much time is spent in each function (which is what I use it for), select "Function Timing"

Your program will start when you press OK, and afterwards you will have the data on the Profile tab in the Output Window (the one at the bottom)

Hope that helps
/John
/John
Aah thank you really much. I got it to work now (it was easy, thanks to you) but I don''t understand much of the output. I see that it prints how many times each function has been called, and how long it has used a function. But if a function is called every frame, then the time for that function will go up. How can I see how long time just one call to the function takes?

Thanks again.

CUselessStuff::NiftyQuote();

@mikaelbauer

Super Sportmatchen - A retro multiplayer competitive sports game project!

Divide the total by the number of calls.

And no, a space is not equal to a new line. They are totally different characters.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]

This topic is closed to new replies.

Advertisement