Category: C

undefined reference to __gxx_personality_v0

When I try to compile c++ code with gcc I have error report undefined reference to __gxx_personality_v0. To solve this problem, you can choose the method : Compile your code with g++ Add flag -lstdc++ at your command when compiling code. Add text void *__gxx_personality_v0; in your source code. Source : http://stackoverflow.com/questions/329059/what-is-gxx-personality-v0-for http://mail.gnome.org/archives/gtk-app-devel-list/2004-October/msg00207.html [crayon-5f007bb17fdf4784075283/]

C/C++ Copy Array

For Indonesian version visit  my blog at http://fsharing.blogspot.com/2011/01/cara-mengcopy-array-di-cc.html When we create array in C/C++, we can copy one array to another by looping every element array with for or while command. Besides using this command, we can use memcpy command (we can must include string.h at header of my code). This is example how to

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