Category: C++/Qt

Qt Error qmetatype.h

I want to add “C” header to C++ header (Qt). The contents of my C++ header is : [crayon-5e55854758083633597713/] when I try to compile this code, I have error message : /usr/include/qt4/QtCore/qmetatype.h:53:2: error: #error qmetatype.h must be included before any header file that defines Bool. To solve this problem, we must put C definiton header

C++ create 2D array

How to create dynamic 2d array in C++ ? This is a code to create 2D array in C++ : [crayon-5e55854758ddc287481009/] If you want to remove or free array 2D, you can use this code : [crayon-5e55854758de2018604546/]

C/C++ Create Directory

We can type “mkdir dirname” command at konsole to create dirname directory. If we can create a directory from C/C++ we can use command mkdir(path, mode) to create directory. Example : [crayon-5e55854759081276367739/] Save code with name main.c and compile code with command : gcc main.c -o createdir type  ./createdir at konsole to running program. When