Posts tagged with C
How much overhead does C++ bring compared to straight C?
The other day, I had a conversation about putting C code onto an embedded chip. I wondered if it was possible to put C++ code on there. The gist of the conversation was that the C++ libraries had a lot of overhead and the executable size would be too large for the space [...]
3 Optimizations for speeding Visual C++ compiled code.
For fun, I participated in a programming contest. Instead of describing the process this time, I thought I’d include a function. Can you guess what it does? I’m changing some of the variable names so it isn’t obvious.
unsigned short result [dim][dim];
void foo(const string& info1, const string& info2, string& ret_val) {
for (int [...]
Timing C/C++ Code on Linux
For my last post, I played around with C++ and a little programming competition. While on the topic, I decided I’d get slightly more serious and enter the next challenge.
One of the things that slightly annoyed me during the process is having to compile/run the program on Windows to enter the competion, while I’m [...]
The Difference Between Dijkstra’s Algorithm and A*
Over the last couple weeks, I’ve had an interest in brushing up my C++ skills. Friday, I came across a programming challenge that looked somewhat interesting and I thought I’d give it a shot.
The object was to find the lowest cost route between 10 cities encoded in a map of integers. Each integer [...]
GTK+ programs with GtkBuilder and dynamic signal handlers.
Well, I decided to review some GTK+ and Gnome development lately. With GTK+, a nice way to create a user interface is with the Glade Interface Designer. Glade produces an xml file with a glade-interface element that can be loaded by libglade. You can then change attributes of the user interface without [...]