Tag Archives: tricks

Approaches to optimize a small program (C++)

Imagine we have to work on the following problem (because it is our new assignment, our boss is obsessed with this problem, etc.): We have a text file that’s a few hundred megabytes long. We knows that this text contains … Continue reading

Posted in C++ | Tagged , , , , , , ,

Macro, with or without you (C++)

“Macros are the bluntest instrument of C and C++’s abstraction facilities, ravenous wolves in functions’ clothing, hard to tame, marching to their own beat all over your scopes. Avoid them.“ C++ Coding Standards: 101 Rules, Guidelines, and Best Practices by … Continue reading

Posted in C++ | Tagged , , , ,

The XOR swap (Programming hacks)

Okay, it is a well-known (and not a very useful) trick, but I must write about it because I’ve never heard about before, and it seems like some kind of magic. Each programmer knows that if he want to swap … Continue reading

Posted in Hacks | Tagged , , ,

Five weird features in C++ that you likely use when you are a great OOP developer

The syntax of C++ seems pretty weird sometimes. Think about the function pointers (int (*ptr) (int, int) = myFunction;), think about functions that return function pointers (int (* func(int a, int b))(int, int)), think about the keyword “const” (const int* … Continue reading

Posted in C++ | Tagged , ,

How to integrate Flash CS5 fla files into a FlashDevelop project (ActionScript 3.0)

The quick answer is simple: create an SWC component from your Flash CS5 fla file and just add them to your FlashDevelop project. If you do everything well, the integration will work very fine. The long and detailed answer is … Continue reading

Posted in AS3 | Tagged , , , ,