Quantcast
Channel: C++
Browsing latest articles
Browse All 43 View Live
↧

Compiling C++ Code

In the earlier chapters we discussed that we write programs in human readable text and then the compiler converts it to machine readable format so that the CPU can execute the program. Now I will give...

View Article


C++ 11: Range based for loop and std::for_each() function

C++11 has introduced a lot of of features to make programming easier. For example automatic type deduction and less typing. Range based for loop and std::for_each() functions are among those. They are...

View Article


C++ Templates

Before we go into the details of C++ templates let us take an example of function overloading. I am assuming you know what is function overloading. Code: #include<iostream> using namespace std;...

View Article

C++ Modular Programming & Compile Multi File Project

In the previous chapter we saw how to compile a C++ source code in a single file. The extension of the source code file name should be .cpp (*.cpp). We also included other files inside the cpp file....

View Article

C++ Inbuilt Data Types

In previous chapter we came to know about data types. There are data types defined by the language called in-built data types. C++ also allows to create new data types. In this chapter we will...

View Article


C++ Inbuilt Operators

Basically computer programming is all about data and manipulation of data. The manipulation is called operation and operations are accomplished with the help of functions and operators. Like functions...

View Article

C++ User Defined Data Types

We learned that all the variables have type. We also learned that type specify the memory size required to store the variable data and the interpretation of the data. So far we discussed about...

View Article

C++ Extending Operators for User Defined Types

We have discussed about inbuilt data types and inbuilt operators which operate on inbuilt data types only. We also discussed about user defined data types. Don’t you think that the operators should...

View Article


Basic of C++ Standard Library

C++ standard library is a set of user defined types(classes), objects and functions which help to develop applications. Without standard library it is very very difficult to write a useful application....

View Article


C++ Closures: Functors, Lamdas and std::function

Objects vs Closures Closures might not be a familiar term for most of the C++ programmers. C++ programmers are very much familiar with class, object and function. Instances of classes are first-class...

View Article

Advanced C++ : Standard Template Library (STL)

As the name suggests STL is the part of the C++ standard library which provides a rich set of template classes and template functions to make application development faster. It is a software library, a...

View Article

STL Containers With Examples

All container classes are part of std name space. Most of the member functions of container classes are common and have common functionality. The decision of which container to use for specif need does...

View Article

C++ Statements, Blocks and Flow Control Statement

C++ program is a collection of statements. Normal statements are sequential and executed sequentially. These statements can be: Declaration Statements, or Expression statements. Also a group of...

View Article


C++ STL Iterators

Iterator is a concept of objects which can be used to traverse through the elements of a collection of objects like STL containers. An iterator object can point to an element within a range of elements...

View Article

C++ STL Functors

STL includes a set of template classes that overload the function call operator (operator ()). Instances of those classes are called functors or function objects. Many algorithm functions in STL take...

View Article


Association, Aggregation and Composition Relationships with Examples

This article talks about Association, Aggregation and Composition Relationships between classes with some C++ examples. Background Association is a simple structural connection or channel between...

View Article

Advance C++ : Non-Modifying STL Algorithms

C++ STL algorithms are template functions which operate on sequence of elements. A large number of such functions are provided by the STL to do operations like searching and sorting. Most of the...

View Article


Game Of Life will not update the next generations in C++

I made a C++ game of life program that displays generations based on the rules to Conrad's Game of Life but the generations are always the same. Keep in mind, I am a pretty new programmer and I really...

View Article

virtual function definition

According to the definition for virtual function is "Virtual functions are member functions whose behavior can be overridden in derived classes. ".What is the meaning of this? Also, why virtual...

View Article

Reading text file

I am new to programming in C++ but I am currently trying to read a text file and then wanting to print it in the console. The text file is 500x2 where the first column is r and the second column is...

View Article
Browsing latest articles
Browse All 43 View Live