Τρίτη, Οκτωβρίου 27, 2009

Καλά να πάθει

Μια του κλέφτη, δύο του κλέφτη, τρεις και ... "βεντούζα"! Πάρτε να έχετε!

Αδιάφοροι και υπερόπτες!

Τετάρτη, Οκτωβρίου 21, 2009

Πάμε γερά


Ο Ολυμπιακός έχει πολλά χιλιόμετρα μπροστά του ακόμα για να γίνει όπως τον ονειρευόμαστε αλλά μοιάζει να είναι στο σωστό δρόμο.

Πέμπτη, Οκτωβρίου 15, 2009

From 32bit to 64bit: void* to int gcc error

Yesterday I encountered the following problem. I was writing a program on a 32bit OS (Linux) and then I tried to compile the same source code on a 64bit Linux. The compilation failed because:

error: cast from ‘void*’ to ‘int’ loses precision

The reason: On 32bit compatible processors void* and int have the same size (32bit) but on 64bit ones void* is 64 bits and int 32 bits long.

The solution: Cast void* to long int.


Source:
http://seokjoon.springnote.com/pages/1688622.xhtml