Skip to main content
gamedev.net
🔒 Locked

C++ error redefinition basic types

Started by Drats 1 reply 1.1k views
Original Post
Drats
Drats
HI I have a line in my code like this typedef list<int> intlist ; this gives me an error that says error c2371 intlist : redefinition , different basic types. Any ideas what is wrong here?
ToohrVyk
ToohrVyk
You already have an 'intlist' defined somewhere in the same scope. Remove it.
nbertoa
nbertoa
Are you including two or more header files with the same intlist definition???
In that case don't forget this:

#ifndef HEADER_NAME
#define HEADER_NAME

// Your
// Code

#endif // HEADER_NAME

Topic Locked

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

Sign in to reply to this topic.