Monday, August 17, 2009

2+2 = 4199232

2+2 = 4199232

If only C++ was not so notorious !

Fig 1. 2+2 = 4199232

Trying out this simple program in Quincy gives a weird output !

What is happening is that, The printf statement: printf("The answer is %d\n"); tells the program to print an integer, but fails to supply one. The printf function doesn't know this, so it will take the next number off the stack (some random number) and print it.

The correct code should be: printf("The answer is %d\n", answer);


Fig 2. Corrected Program, 2+2 = 4

Running the program in Unix (Ubuntu) gave another result ! 2+2 = 134518880

Fig 3. 2+2 = 134518880






REFERENCES

(1) Oualinne, Steve "How not to Program in C++", No Starch Press 2003
(2) Quincy

Thursday, August 13, 2009

MY PROJECT LOGO

MY PROJECT LOGO !

Now ! ..... to stamp my mark on my projects, I had to think of something ! ...

This logo has a 60s looks to it !...
but looks snazzy ! .... this logo can be seen on top left of all my google-codes pages !

Fig 1. My Personalised logo


Thursday, August 6, 2009

HOW DID I GET A SOFTPEDIA PAGE ???

I JUST DO NOT KNOW !

I had uploaded my recent game PIRATE SLOT MACHINE 1.1 on google codes with links on Pygame page ! ...... and voila I now have a softpedia advertisement ! ..... seems open source goes places .... all across the web!

Pic1. How did it happen ??

Fig2. It keeps getting weirder !

REFERENCE
(1) Softpedia page 1 !
(2) Softpedia page 2 !