Home / Posts

Set Operation using Bit in C++

November 24, 2015 | Article | No Comments

Set operations are operations over a set. In this article we will discuss about how to perform some set operation with integer and bit operation. With this we can do at most 32 member on a single set (32 is the total number of bit on 32-bit machine). But before that, let’s check the basic […]

C++ Ranged Based Loop

November 24, 2015 | Article | No Comments

C++11 has bring some nice usability improvements to the language. It removes unnecessary typing and other barriers to getting code written quickly. One example we’ve already covered is the new meaning of the auto keyword; now I’d like to talk more about the range-based for loop–both how to use it, and how to make your […]

C++ has from the beginning attempted to improve on the type system of C, adding features like classes that let you build better types and enums, which eliminate the need for some uses of the preprocessor (which is not at all type safe). C++ also performs fewer implicit type conversions for you (such as not […]

The Language of Ancient, C++ C++, one of old programming language that still exist today. C++ is popular and still evolving. The language is created by Bjarne Stroustrup. The language itself is improvement of C language, language which is well known as a robust and reliable language for low level. C++ in earlier stage is […]

Guide to Function Pointer in C\C++

November 24, 2015 | Article | No Comments

A function pointer is a variable that stores the address of a function that can later be called through that function pointer. This concept is interesting and really useful because functions encapsulate behavior. For instance, every time you need a particular behavior such as drawing a line, instead of writing out a bunch of code, […]

Guide to Lambda Closure in C++11

November 24, 2015 | Article | No Comments

One of the most exciting features of C++11 is ability to create lambda functions or lambda closures. What does it mean? A lambda function is a function that you can write inline in your source code (usually to pass in to another function, similar to the idea of a function pointer). With lambda, creating quick […]

Template Metaprogramming with C++

November 24, 2015 | Article | 1 Comment

Template metaprogramming is a metaprogramming technique in which templates are used by a compiler to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled. The output of these templates include compile-time constants, data structures, and complete functions. The use of templates can be thought […]

Multithreading Programming in C++11

November 24, 2015 | Article | 1 Comment

Before C++11, C++ doesn’t support multi-threading natively. A C++ program for threading must depend on others threading implementation. That is a source code for Windows threading is different with POSIX-Unix threading. But the newest standard has including multithreading support natively. Hurray! Let’s begin by creating and launching a thread in C++11. [sourcecode language=”cpp”] #include <iostream> […]

Move Semantics and rvalue references in C++11

November 24, 2015 | Article | No Comments

C++ has always produced fast programs. Unfortunately, until C++11, there has been an obstinate wart that slows down many C++ programs: the creation of temporary objects. Sometimes these temporary objects can be optimized away by the compiler (the return value optimization, for example). But this is not always the case, and it can result in […]

There are several improvements in C++11 that promise to allow programs written using C++11 to run faster than ever before. One of those improvements, generalized constant expressions, allows programs to take advantage of compile-time computation. If you’re familiar with template metaprogramming, constexpr will seem like a way of making your life much easier. If you’re […]

Social Share Buttons and Icons powered by Ultimatelysocial