Archived

This topic is now archived and is closed to further replies.

STL Help. This is weird.

This topic is 6594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What are you plugging into the list when you initialize it? As I'm sure you know, the STL is basically a group of complex macros. It plugs your data in and compiles from scratch. It sounds like you're plugging in something that STL can't handle.

Share this post


Link to post
Share on other sites
I've got a function in my test class called Add and the argument is a list of the class type. sort of like

class CMyClass
{
private:
...
public:
...
Add(list ClassList);
};

I can send you the test app code if you like, it's really small.

Thanks!
--zc

Share this post


Link to post
Share on other sites
Ok, this is strange to me. I'm trying keep track of entities based on an STL list. Only when I compile, I get weird error messages INSIDE list.h. Posted below are the errors. Anyone know how to remedy this?
Thanks!

c:\program files\microsoft visual studio\vc98\include\list.h(37) : error C2146: syntax error : missing ';' before identifier 'Length'
c:\program files\microsoft visual studio\vc98\include\list.h(37) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\list.h(37) : error C2501: 'Length' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\list.h(53) : error C2146: syntax error : missing ';' before identifier 'GetPrevLink'
c:\program files\microsoft visual studio\vc98\include\list.h(53) : error C2433: 'WINAPI' : 'inline' not permitted on data declarations
c:\program files\microsoft visual studio\vc98\include\list.h(53) : fatal error C1004: unexpected end of file found

Share this post


Link to post
Share on other sites
Ok. Now the last problem is fixed. Everything compiles. But when I add a new class object to the list, it loses all of the information that is associated to the member data that was set by the contstructor. Any idea why this would happen?

thanks!
--zc

Share this post


Link to post
Share on other sites