Hard Light Productions Forums

Off-Topic Discussion => Programming => Topic started by: blackhole on July 26, 2008, 03:44:19 pm

Title: Stupid VC++
Post by: blackhole on July 26, 2008, 03:44:19 pm
Quote
Error   1   error C2440: 'return' : cannot convert from 'PlaneShader::cLinkedListNode<T> *' to 'PlaneShader::cLinkedListNode<T> *'
Title: Re: Stupid VC++
Post by: Uchuujinsan on July 26, 2008, 09:34:25 pm
I had this error once.

The reason was I used a template that couldnt be resolved during compiletime, but only during runtime. Thats impossible either, so the compiler reported an error.
As you are also using templates, maybe check for this?
Title: Re: Stupid VC++
Post by: blackhole on July 26, 2008, 10:27:28 pm
The problem was actually that I had an unnessacary indirection; not that hard to find, but still funny :P
Title: Re: Stupid VC++
Post by: WMCoolmon on July 31, 2008, 03:31:55 am
Reminds me of the time I spent several hours debugging code only to find the problem was that I had &'d a * to make it a **, but the function was still accepting it and assumed it was a *.
Title: Re: Stupid VC++
Post by: blackhole on August 01, 2008, 10:55:27 am
I once had an issue with a pointer losing information because the class it was originally created in was destroyed and the pointer was only stored as its base class. Drove me crazy for almost 3 days.
Title: Re: Stupid VC++
Post by: blackhole on August 09, 2008, 08:35:40 pm
Since when did I know chinese?

(http://img413.imageshack.us/img413/7637/vs2008wtfwp6.png)
Title: Re: Stupid VC++
Post by: WMCoolmon on August 09, 2008, 09:52:44 pm
ちゅぅごくじん は ァメリカじん の コンピュタ を もつて ぃますか
Title: Re: Stupid VC++
Post by: Uchuujinsan on August 10, 2008, 06:54:41 am
Well, why not? Its not like export of computers is forbidden in the USA, or import forbidden in China :)

B2topic, I regularly have problems with VC++ that are solved as I make a complete recompile - it really drove me crazy at first, as the error was not in my code, but in some intermediate file that didnt get updated properly. And I spent hours checking what I did wrong...
Title: Re: Stupid VC++
Post by: blackhole on August 10, 2008, 03:18:06 pm
B2topic, I regularly have problems with VC++ that are solved as I make a complete recompile - it really drove me crazy at first, as the error was not in my code, but in some intermediate file that didnt get updated properly. And I spent hours checking what I did wrong...

And that is why, when in doubt, I clean and rebuild from scratch.
Title: Re: Stupid VC++
Post by: Flipside on August 10, 2008, 07:12:11 pm
My biggest weakness is lack of knowledge on how to use the compiler, the languages themselves obey the same rules they ever did, but the Compiler is like the deck of the sodding Enterprise :(
Title: Re: Stupid VC++
Post by: karajorma on August 12, 2008, 04:12:16 am
B2topic, I regularly have problems with VC++ that are solved as I make a complete recompile - it really drove me crazy at first, as the error was not in my code, but in some intermediate file that didnt get updated properly. And I spent hours checking what I did wrong...

And that is why, when in doubt, I clean and rebuild from scratch.

Yep.

But you shouldn't have to.
Title: Re: Stupid VC++
Post by: WMCoolmon on August 12, 2008, 05:38:57 pm
Well, why not? Its not like export of computers is forbidden in the USA, or import forbidden in China :)

B2topic, I regularly have problems with VC++ that are solved as I make a complete recompile - it really drove me crazy at first, as the error was not in my code, but in some intermediate file that didnt get updated properly. And I spent hours checking what I did wrong...

One thing I've noticed that could be an issue is files that are named the same thing, but are in different folders in the code tree, but get put in the same intermediate folder when build occurs.
Title: Re: Stupid VC++
Post by: karajorma on August 16, 2008, 04:38:43 am
This classifies as a minor annoyance more than anything but I had SEXP.cpp open in VC2005. I edited the file using an external program to change something. VC2005 detects the change as soon as I focus the window and asks me if I want to reload, which I do. I hit F5 to debug and instantly up comes FS2_open.

So wait. VC is smart enough to monitor any open files constantly and figure out that I've changed them to second I have but isn't smart enough to figure out that if I've changed a file I'll need to compile it! :rolleyes: :D