This is when I try to output uninitialized characters on the screen. I thought C++ should declare all of them to 0's (or '\0' for characters) when I declare them without initializing?

The c++ standard gives no guarantee that a variable will be initialized to zero or null. Some compilers may add this functionality in but it is not guaranteed. You should always initialize your variables when you declare them. This is especially true for counter variables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.