Archive for January, 2008

Quiz

Coders4fun Quiz #3: Will it compile?

Will this code compile??? Why?

foo.h

class Foo
{
	public:
		Foo();

		void fooo();
	private:
		int i;
		char c;
		short s;
	protected:
		char b;
		char e;

		char getFoo();
}

foo.cpp

#include "foo.h"

Foo::Foo()
{
	for (int i = 0; ; ) { }
}

void Foo::fooo()
{
while(true)
{
	c = 'f';
}
}

char getFoo()
{;
	return c + 2;
}

C, Source Code

How to use poEdit

In this guide I will explain how to simplify the localization process of a software written in c++ using “wxWidget (a cross platform toolkit), with poEdit.
poEdit offers to developers a conventient approach to localizazion, and there is no need to modify the source code by hand to modify translations, because they are all stored on a catalog file that is easy editable.

Logo poEdit

To prepare the source code to the localization, we must sorround all strings that we want to localize with the macro “_()”, for example:

...
wxMessageBox( _("localized string") );
...
wxMessageBox( wxT("not localized string") );

Continue Reading »