O'Reilly logo

C++ Application Development with Code::Blocks by Biplab Kumar Modak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project with multiple files

In this section we'll learn about C++ app development comprising of multiple files. We'll develop a class, called Vector, which implements a dynamic array. This class is similar to the std::vector class offered by Standard Template Library (STL) and has a very limited set of features compared to STL class.

Create a new project and name it App2. Navigate to File | New | File… menu option and then choose C/C++ header option and follow the wizard to add a new file to App2 project. Add the following code in a new file under App2 and name it vector.h file:

#ifndef __VECTOR_H__ #define __VECTOR_H__ #ifndef DATA_TYPE #define DATA_TYPE double #endif class Vector { public: Vector(size_t size = 2); virtual ~Vector(); size_t GetCount() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required