Wednesday 2 December 2009

C++ errors

A list of annoying C++ compilation errors and how I finally resolved them:


(1)
...undefined reference to `typeinfo...
or
...Undefined reference to vtable

Solution: A base class from which classes are derived contains virtual function(s) but they are missing null bodies.

e.g.
virtual float getvalue() ;
should read:
virtual float getvalue() {} ;




(2) error: passing `const Quat' as `this' argument of `Quat& Quat::operator=(const Quat&)' discards qualifiers


Solution: A "const" type cannot be changed. I was attempting to assign a value to a const type. Created a new variable of same type (but not const).


(3) error: aggregate ‘std::stringstream ss’ has incomplete type and cannot be defined
or
error: X has incomplete type

Usually this refers to STD::X objects.
You've included but you need to include or
for files (ifstream/ofstream) and stringbuffers.



[to be continued]

Thursday 28 May 2009

PhotoSynth for all!

Microsoft have released Photosynth for public use, so you can now create your own walk-through environments, just by providing multiple photos of the scene. The interface needs a bit of improvement but it's easy enough to use. Here's a few initial tests I did...

Allegheny National Park

Niagara Falls

Monday 24 November 2008

Pseudo-safe email

I thought it was relatively safe to write my email address as (for example):
myname at eeng dot dcu dot ie

However, I speculated that this formula is far too simple, and I wondered if spammers have already exploited this notation. I found that google returns over 100 million hits for:

* at * dot * dot *

So it seems that this method of mail-obfuscation is ineffective. Email addresses harvested in this way probably produces a list of people who are both more cautious and more technically knowledgeable than average. I'm currently writing the bot and I'm in negotiations with ThinkGeek's paranoia division.

Thursday 9 October 2008

Wednesday 16 July 2008

Monday 10 March 2008

Friday 5 October 2007

Gone West

View from the top of the hill


Cliffs of Moher


The man in the rockface
(zoom in to lower left part of cliffs)


View from Dungaire Castle

SorrentoPano


Cluain Mhic NĂ³is

Monday 27 August 2007

Tuesday 17 July 2007

Monday 7 May 2007

Tuesday 24 April 2007

Valley of the Temples

Hawaii Photos: Batch "A"


Spot the difference


You insult the Buddha? DIE!