Libraries

Welcome all to a rooks guide to C++. The first topic of discussion is the use of libraries. Libraries include the operands are used within functions. The most common libraries for this course are stdio.h stdlib.h string and iostream. Not the most complex idea to grasp, but make sure that you are using the right library for the operands that you are using. If the error code file directory not found is present you can assume that you are having an error with your libraries. The operands can be found to their corresponding libraries on codestack.com. For the first programs you write you will be using the libraries stdio.h and stdlib.h and using operands such as scanf, printf, int, char, else, if, else, if, etc.

When including libraries make sure you are using the correct notation.

#include

#include

etc.

Now lots of projects that you will use are C shortcuts and you can actually include this in your C++ projects using the term using namespace std; This eliminates countless lines of codes later on. It is most commonly used in our cases with the libraries for strings as well as iostream which. Note: iostream is not a .h library.

These can be defined by

#include <iostream>

using namespace std;

Other useful libraries include: math.h and ctime (time.h)

All of these libraries contain different operations that you should determine based on the project parameters. All of the operations used in this course will be used in the following codes (except for math.h operands).

Questions about operands or libraries and their uses should direct their questions to cplusplus.com

Advertisements

One thought on “Libraries”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s