Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  TIOBE : Objective-C overtakes C++

TIOBE recently released the programming community index for July. From the index,we can find that the biggest change is that Objective-C overtakes C++ as the 3rd most popular language among programmers. Because of the popularity of iPhone and iPad, Objective-C is used by more and more mobile developers who want to develop apps for Apple products. Also, many developers are willing to develop apps for Apple since they can gain more profit on Apple platform than on Android platform.C++ is mainly used for developing high performance large systems, this is different from Objective-C which is mainly...

6,613 0       TIOBE C++ JULY OBJECTIVE-C OVERTAKE


  malloc/free and new/delete in C++

malloc and free are C++/C language standard library functions, while new/delete are operator of C++. They can be used to allocate dynamic memory and free memory in C++ programs malloc/free can not meet the requirements of dynamic objects creation. Object needs to call the constructor to initialize the object when creating, the object needs to call the destructor before it is destroyed  Since malloc() and free() are library functions rather than operators, the compiler has no control permissions on them, so it can not impose the task of object construction and destruction on malloc() and f...

14,610 1       MEMORY C++ DELETE FREE MALLOC NEW


  Facebook open sources its C++ library named Folly

Recently, Facebook open sourced its low level C++ function library for its internal use named Folly. Folly is an open sourced C++11 component library, it provides functions similar to what boost and std libraries provide, including string, vector and memory allocation, bit operation etc, to fulfill large scale high performance requirements.Currently Folly is tested with gcc4.6 on some 64 bit systems such as Fedora 17, Ubuntu 12.04 and Debian wheezy, it may also be OK on other 64 bit platforms without any modification. If the performance of your software is what you concern, you can have a try ...

5,491 1       OPEN SOURCE C++ FACEBOOK FOLLY


  Using MySQL Connector/C++ with Visual Studio 2010

MySQL Connector/C++ is one of the latest connectors for MySQL, developed by Sun Microsystems. The MySQL connector for C++ provides an object-oriented application programming interface (API) and a database driver for connecting C++ applications to the MySQL Server.When we want to build a database application with C++ using Visual Studio 2010, we may use the MySQL Connector/C++, but sometimes we may encounter different errors, either compile or runtime error. After tried many times, I finally made my C++ program successfully connect to MySQL database with Visual Studio 2010. Here I share what I ...

30,585 1       C++ VS2010 MYSQL CONNECTOR VISUAL STUDIO 2010


  Must read C++ book list

Every programmer should read some books to enhance their understanding about the language before the start to practice. But some of us often wonder what books we should read and in what order. Some books may not be suitable for beginners and some books may cover the similar topics. Here I summarize a C++ book list we should read.Stage 1"Essential C++" : It is short but powerful and it can enhance our understanding of C++'s features.This book is specifically designed to bring you up to speed in a short amount of time. It focuses on the elements of C++ programming that you are most likely to enc...

19,273 0       C++ READ BOOK LIST EFFECTIVE C++


  A C++ program puzzle

Recently I came across a question asked by wang2191195 on a Chinese IT forum CSDN which asks about a C++ program puzzle. He has a code snippet which cannot be compiled. The code is:#include <cstdlib>#include <iostream>using namespace std;class Base{public: virtual void func(){ cout << "Base::func()" << endl; } virtual int func( int num ){ cout << "Base::func( int " << num << " )" << endl; return 0; }};class Derived : public Base{public: virtual void func(){ cout << "Derived::func()" << endl; ...

11,333 4       C++ OVERLOAD PUZZLE HIDE


  Functional Programming in C++

Probably everyone reading this has heard “functional programming” put forth as something that is supposed to bring benefits to software development, or even heard it touted as a silver bullet.  However, a trip to Wikipedia for some more information can be initially off-putting, with early references to lambda calculus and formal systems.  It isn’t immediately clear what that has to do with writing better software.My pragmatic summary:  A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states t...

2,424 0       C++ FUNCTIONAL PROGRAMMING


  Eight C++ programming mistakes the compiler won’t catch

C++ is a complex language, full of subtle traps for the unwary. There is an almost infinite number of ways to screw things up. Fortunately, modern compilers are pretty good at detecting a large number of these cases and notifying the programmer via compile errors or warnings. Ultimately, any error that is compiler-detectable becomes a non-issue if properly handled, as it will be caught and fixed before the program leaves development. At worst, a compiler-detectable error results in lost time while the programmer searches for a solution or workaround.The dangerous errors are the ones that co...

33,821 3       C++ COMPILER ERROR DETECTION