Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Program Performance

  1. Sep 28, 2004 #1
    I,m writting code in C/C++ and when i validate my enteries(ensure they are numeric) i use !cin.good().

    Also how do i clear the buffer after an invalid entry?
    I usually use cin.seekg(0);cin.clear(); How do they work?
    Is there a better way?

    How do i find out how much proccessing power and memmory my prog uses as it runs?

    -01000011 01101000 01100101 01100101 01110010 01110011.
  2. jcsd
  3. Sep 30, 2004 #2


    User Avatar
    Staff Emeritus

    You need what is called a memory profiler. I know under linux there is memprof and under visual studios 6 I think the program is called spy or something or other (Don't quote me on this).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook