Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DGDK <vector> problem (not /MT)

Author
Message
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 15th Apr 2008 19:35




wtf is the problem =/
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 15th Apr 2008 19:38
nevermind im an idiot.
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 15th Apr 2008 20:07
Just a tip ... if you include the following after your include statements you won't need to prefix your vector declarations with std::



No matter how good your code is, someone will improve on it
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 15th Apr 2008 20:07
or

using namespace std;

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Apr 2008 20:11
or:
using std::vector
(the best way, I think)

draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 15th Apr 2008 21:04 Edited at: 15th Apr 2008 21:04
is 'using namespace std' safe? I remember reading somewhere that it caused problems with the GDK libraries.. I suppose 'using std::vector' is the safest.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 15th Apr 2008 21:07 Edited at: 15th Apr 2008 21:09
I don't see any difference between specifying the namespace and fully qualifying the namespace member. You'd still need to remove the /MTd linkage and put in /MT.

To me the advantage of "using" comes in handy when needing to use multiple entities in the specified namespace in the same program

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-11-20 07:29:05
Your offset time is: 2024-11-20 07:29:05