How to Learn C++

Chances are quite likely that the computer operating system and browser you are using to view this page were created by using the C++ programming language. It is one of the most prevalent programming languages out today and can be a nicely rewarding challenge to learn. This article will give you a basic intro to learning the C++ language and a number of resources to help you on your way.

Instructions

  1. Finding Helpful Resources

    • 1

      Find a teacher-taught course or a knowledgeable friend to help get you started learning C++. New programmers always have lots of questions and the easiest way to have them answered is by knowledgeable and experienced people who teach or already use the C++ language.

    • 2

      Choose a good tutorial or reference book geared toward beginners. Even if C++ is not your first programming language, a beginner's book can more clearly explain the differences from other programming languages.

    • 3

      Use C++ tutorials and articles on the Internet to help you along. Many of the writers of C++ articles on the web are experienced developers who wish to share their knowledge with people who are just starting out. It may not be best to begin with the web as the information can be spread out and not presented in a cohesive manner. It should be viewed as an additional resource.

    Installing C++ Software

    • 4

      Search Msdn.com for C++ Express software. Microsoft Visual C++ Express is one of the most prevalent C++ compilers and is free of charge.

    • 5

      Download and install the latest Microsoft Visual C++ Express Edition.

    • 6

      Run the MS Visual C++ Express program from the shortcut on your desktop. The program will open to the "Create Project" window.

    Using C++

    • 7

      Select the options in the "Create Project" window to create a console application with compiled headers. There should now be a basic C++ program displayed in the main IDE (integrated development environment) window.

    • 8

      Add the lines "include iostream";" at the beginning of the file and "std::cout << "Hello World!";" on a new line just before the "return 0;" statement. This will be your first basic C++ program. (All items should be entered without the quotes, except when required, as on the "iostream" statement).

    • 9

      Compile the program by selecting "Build All" from the "Build" menu. Once the program has completed compiling, the status bar at the bottom of the main window should show that the build completed successfully.

    • 10

      Start the program by selecting "Start Debugging" from the "Debug" menu. It should open a DOS window box that will briefly display the words "Hello World!" before closing. You've just compiled and run your first C++ program.

Tips & Warnings

  • The Linux OS also provides a number of free C++ compilers and tools. This is one of the most common methods of learning C++, though it does take Linux know-how to use.

  • Any programming language like C++ is based on a set of keywords. These are words that are used to define the language, its structure and its operations. Keep in mind that you do not have to learn all of the keywords of a language to use it.

  • Learning C++ will take lots of patience and a keen eye for detail. Don't get discouraged when a program you've written doesn't work properly. Simply take the time to examine your code and refer to knowledgeable resources when necessary.

  • The Microsoft Visual C++ Express Edition is a free, stripped-down version of the popular Visual C++ Professional Edition program. It is simply to be used to learn the language and how to use Microsoft's development products. It should not be used to develop full-fledged production programs.

Related Searches:

Resources

Comments

  • djeff37 Oct 28, 2009
    Thanks for this article, I will give this a try...

You May Also Like

Related Ads

Featured