Thread: MSVC 2k3 7.1 bug?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    10

    MSVC 2k3 7.1 bug?

    Code:
    class ENTITY
    {
    public:
    ..........
    			static list<ENTITY*> m_universe; // All existing entities.
    
    			ENTITY(unsigned int speed, double mass, double lift, double friction)
    			{
    				// Physical properties
    				m_speed = speed;
    				m_mass = mass;
    				m_friction = friction;
    				m_lift = lift;
    				m_tick_count = infinite-m_speed;
    
    				m_universe.push_back(this); // <--- read error at 0x00000004
    				last_tick_collided = false;
    			}
    ........
    };
    Right here:
    Code:
    	void _Insert(iterator _Where, <--- The 'this' pointer is correct.
    		const _Ty& _Val)
    		{	// insert _Val at _Where
    		_Nodeptr _Pnode = _Where._Mynode();
    		_Nodeptr _Newnode = _Buynode(_Pnode, _Prevnode(_Pnode), _Val); <--- exception here
    		_Incsize(1);
    		_Prevnode(_Pnode) = _Newnode;
    		_Nextnode(_Prevnode(_Newnode)) = _Newnode;
    		}
    Not to mention that I've also been getting these errors:
    error C2440: 'initializing' : cannot convert from 'std::list<_Ty>::iterator' to 'std::list<_Ty>::iterator'
    with
    Code:
    list<ITEM_TYPE>::iterator item = m_items.end();
    where ITEM_TYPE is a class template argument... I have to resort to memcpy'ing it.

    Are these compiler errors or what?
    Last edited by RITZ; 03-26-2006 at 12:57 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ATL bug of CComPtr?
    By George2 in forum Windows Programming
    Replies: 6
    Last Post: 04-07-2008, 07:52 AM
  2. MSVC 7.1 Compile time
    By cboard_member in forum Tech Board
    Replies: 10
    Last Post: 08-05-2006, 04:04 PM
  3. MSVC 7.1: Template specialisation??
    By cboard_member in forum C++ Programming
    Replies: 4
    Last Post: 06-12-2006, 10:19 AM
  4. Allegro with MSVC 7.1!
    By Sentral in forum Game Programming
    Replies: 4
    Last Post: 03-08-2006, 04:10 AM
  5. GCC (cygwin) much faster than MSVC, Borland?
    By Sargnagel in forum C Programming
    Replies: 15
    Last Post: 08-05-2003, 03:15 AM