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-5edca08cc9303608277056/] 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-5edca08ce9f4b249117472/] If you want to remove or free array 2D, you can use this code : [crayon-5edca08ce9f55193952537/]

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-5edca08cea27b819556566/] Save code with name main.c and compile code with command : gcc main.c -o createdir type¬† ./createdir at konsole to running program. When