A Beginner’s Checklist

Beginners and even experienced programmers who switch to a new compiler suddenly discover that their programs don’t compile anymore. Sometimes the programs compile but produce numerous warning messages. In most cases, the causes of this are common. Here is a short checklist for troubleshooting such frequent errors and omissions.

  • Avoid using the .h standard headers. These files are deprecated and outdated. Instead, use the new file header naming convention. For instance, instead of and always use and respectively.
  • Pay attention to namespaces. The standard header files are all declared in namespace std. You must provide a fully qualified name if you’re referring to any of the identifiers in these files. For example: use std::cin, std::vector and std::string instead of cin, vector and string. Alternatively, place a using-declaration or a using directive in your program.
  • String issues. The definition of the term
  • Share the Post:
    Share on facebook
    Share on twitter
    Share on linkedin

    Overview

    Recent Articles: