Sometimes, it is needed to round off a number to some decimal digits. Again stringstream comes to help us with the aid of iomanip function setprecision. Following is a sample function to round off a … more →
My Experiments with C++Sean wrote 7 months ago: Overview of VC++ 2005 This series of notes are about usage of VC++ 2005, not about general C++ progr … more →
cppkid wrote 9 months ago: Sometimes, it is needed to round off a number to some decimal digits. Again stringstream comes to h … more →
cppkid wrote 10 months ago: We can associate a 32 bit value with each row of a list box. The member function SetItemData() of CL … more →
cppkid wrote 10 months ago: I had the habit of using [] operator to access elements of a map. For example, if we have map<int … more →
cppkid wrote 10 months ago: Noramally, the value of a variable declared in a function can be seen in the watch window only when … more →
cppkid wrote 10 months ago: new operator is used to allocate memory in C++. Though it is rare that a modern day computer is not … more →
cppkid wrote 11 months ago: The function GetWindowRect(), defined in WinUser.h, is able to give the current screen resolution. T … more →
cppkid wrote 11 months ago: I here illustrate how a dll written in C# is called in C++ (without CLR). Make a DLL in C# Let … more →
cppkid wrote 11 months ago: Sometimes it will be necessary to increment or decrement a variable in a atomic manner so that no ot … more →
cppkid wrote 11 months ago: The function GetTickCount() (defined in WinBase.h) returns the no. of milliseconds elapsed since the … more →
cppkid wrote 11 months ago: The processor speed in MHz can be read directly from the registry location HARDWARE\DESCRIPTION\Syst … more →
cppkid wrote 11 months ago: With a little bit of help from assembler, we can find the exact CPU cycle count. This can be very mu … more →
cppkid wrote 1 year ago: The folowing is a description of some of the shortcut keys in Visual Studio 2005 (generously contrib … more →
cppkid wrote 1 year ago: In the last post, I described how to open/close cd tray. Some of you might have raised your eye brow … more →
cppkid wrote 1 year ago: Using VC++, it is quite simple. We can treat cd drive as an IO file using the windows API CreateFile … more →
cppkid wrote 1 year ago: Sometimes the intellisense stops itself in visual studio. Don’t panic. Go to your project dire … more →
cppkid wrote 1 year ago: A const_iterator is not a const iterator. That is, const vector<int>::iterator it; and vector … more →
cppkid wrote 1 year ago: At times, I had been annoyed that the watch window was not showing the whole contents of a pointer a … more →
cppkid wrote 1 year ago: The keyword const specifies that you can not change the value of the variable. When it comes to poin … more →