Archive for May, 2008

In Microsoft Word…
How to set 2 columns
Click the columns button in the toolbar– it looks like 2 columns of text– and click the number of columns you want.
How to move margin up, for whitespace
On the left side, there’s a vertical ruler. Scroll to the bottom of the page, and find the margin indicator, by default [...]

C++ cin int infinite loop

Posted on May 1st, 2008 by Elliot

There are some ridiculous things in C++, like the fact that there exists getc(), getch(), getche(), getchar(), and _getch() and they’re all different. Press Enter to Continue getch
If you’re doing cin of an integer, and the user enters a character, they’ll get stuck in an infinite loop. I found a good way to fix this [...]

Answer: ifstream cannot be copied (doesn’t have a copy constructor).
Solution: Don’t store an ifstream. If you must, then declare and create a copy constructor.
This help me figure out this error: Google Groups