Category Archives: c++

malloc double free/non- aligned pointer being freed set a breakpoint in malloc_error_break to debug

malloc: *** error for object 0x3874a0: double free ***set a breakpoint in malloc_error_break to debug malloc: *** error for object 0x18a138: Non- aligned pointer being freed *** set a breakpoint in malloc_error_break to debug So basically something in your code … Continue reading

Posted in c++, linux | Tagged | Leave a comment

When Good Customers Go Bad

class Customer; class CustomerEx; // Added 20.03.2006 class CustomerEx2; // Added 05.10.2006 class CustomerEx2B; // Added 13.07.2008

Posted in c++ | Tagged | Leave a comment

libxdgmm

I think the Portland Project from freedesktop.org, is a great idea and everyone should be supporting it in their applications. I’ve just created a very small C++ wrapper (libxdgmm) for accessing XDG more easily. To use it, you need libxdgmm.h … Continue reading

Posted in c++, libxdgmm, linux, xdg | Tagged | 2 Comments

C++0x compiling with gcc

Gcc has some early support for C++0x. You can enable it with -std=c++0x (Note: You can already use Boost without enabling this flag). Enabling this flag broke boost::filesystem for me, but this has already been reported and fixed: boost/filesystem/operations.hpp 661 … Continue reading

Posted in c++0x | Leave a comment

AHGotoPage Doesn’t Work Argh!

It looks like AHGotoPage is broken with Mac OS X 10.5.7 and later (It was also broken on 10.3.9 and earlier). Probably the easiest way around this for the moment is to open your help documentation in a web browser … Continue reading

Posted in c++ | Tagged | Leave a comment

Yearly Update :)

It’s been a while, I have like 20 draft entries in WordPress ranging from 1 paragraph comments up to 10 paragraph full on entries that still need that final once over and edit before going live. Actually it might be … Continue reading

Posted in c++, gamedev, linux | Leave a comment

x86_64 Linux C/C++ Test

I use: gcc cmake KDevelop RapidSVN Meld However, don’t go the websites, all of these are available in the (Default?) repositories, so you can either install them via yum, PackageKit or apt-get. Also note: RapidSVN and Meld are only needed … Continue reading

Posted in c++, linux | Tagged , | Leave a comment

const int vs. enum vs. #define

Example A: int GetValue0() { return 10; }   int GetValue1() { return 10 + 10; }   int GetValue2() { return 10 * 10; } So if all of the values 10 represent a common magic number then you … Continue reading

Posted in c++ | Leave a comment