Skip to main content
gamedev.net
🔒 Locked

STD list

Started by WoolyUK 12 replies 1.1k views
Original Post
WoolyUK
WoolyUK
Hiya, Working on a project as part of a contract at the moment, and i've received a pile of code that I need to turn into a product :) However when I compile part of it I keep getting std list errors such as: error C2039: 'list' : is not a member of 'std' from lines like: typedef std::list <DlsWirelineSlot> DlsWirelineSlotList; Any ideas what could cause this? list is being included and everything seems fine. Thanks, Adam
VolkerG
VolkerG
#include <list>
for AP: The forum eats the < and >
WoolyUK
WoolyUK
I have that already :(
python_regious
python_regious
Are you sure that it's #include <list> and not #include <list.h>?
If at first you don't succeed, redefine success.
DigitalDelusion
DigitalDelusion
Quote:
Original post by WoolyUK
I have that already :(


your compiler seems to be of a entierly diffrent opinion.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
WoolyUK
WoolyUK
Thanks for replies..

Hmmm ok its definately there, tried #include <list> and #include <list.h>

still getting same error...

DigitalDelusion
DigitalDelusion
sounds really really odd, but try moving the list include just above the typedef to see if that remedies the problem.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
WoolyUK
WoolyUK
Still same thing... No idea whats causing this, I agree it's very odd.
Qw3r7yU10p!
Qw3r7yU10p!
come up with a minimal example that doesn't work

e.g.

#include <list>int main() {    std::list<int> mints;    return 0;}


does this compile for you?
WoolyUK
WoolyUK
That compiles seperately, must be something in the project throwing it. Hmmm
WoolyUK
WoolyUK
Ok it seems the code I have been sent is very dodgey, despite being informed it works. Scanned through the code above and there were subtle errors which seem to have been messing it up.

Thanks for replies :)


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.