Viewing 1 to 7 of 51 items
Archive | C++ RSS feed for this section

How to Send Email Through Gmail Using Libcurl

I needed to send an e-mail through my C++ program and was able to do it using Libcurl. Since I had a hard time initially, I decided to share the following with you. Download libcurl First download libcurl. I found binaries for my OS, Mac OSX, with some instructions on how to unpackage it making  Full Article…

1

C++ – Scope of Variables

The scope of a variable determines the block of instructions in which a variable may be accessed. To understand this topic, we’ll start by discussing local variables. Local Variables Local variables may be accessed within the block of instructions in which they were declared. For example, when we write a main function, all variables declared  Full Article…

1

C++ Functions

A function gives the user the ability to execute a block of instructions on a set of inputs to receive a particular output. Functions are useful when the user needs to execute a set of instructions many times with different parameters. The syntax for a function is below: return_type name(parameter1, parameter2, …) { statements }  Full Article…

0

C++ Do While Loop

The Do While Loop is different from the While Loop for one reason only. The condition is checked after executing the statements. Therefore, this loop guarantees that the statements will be executed at least once. The syntax for the Do While Loop is below: do {   // Statements …   } while ( condition  Full Article…

3

C++ For Loop

In our previous tutorial, we learned about C++ While Loops. Today, we’ll learn about for loops. For loops are different than while loops due to the way they function. This allows one to choose what type of loop to use depending on the problem. For example, while loops are useful for executing statements until a  Full Article…

1

C++ While Loop

In our previous tutorial, we learned about C++ If Statements which introduced us to the idea of control flow and conditions. Today, we introduce the while loop. The While Loop The while loop is another control flow structure that allows the programmer continuously execute a block of instructions until a specific condition is met. Below  Full Article…

2

C++ If Else Statements

In our previous tutorial, we learned about C++ input and output to make our programs more interactive. Well, today we are going to learn how to use If Then Else statements to allow us to control the flow of the program. This will allow us to execute code based on a given condition. Below is  Full Article…

0