Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
| Search | Today's Posts | Mark Forums Read
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2005, 10:45 AM
Registered User
 
Join Date: Aug 2005
Location: Edinburgh, Midlothian, United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to synaptic
Default Moved from VC6 to VC2003

Hi, im new to these boards so forgive me if i've posted in the wrong place. I'm currently studying at edinburgh university and i was using msvc6 at home but i've just upgraded to vc2003 and im now faced with the problem that my game i've been creating will no longer compile, i keep getting error c2226: Syntax error: unexpected type 'T' since i dont have a documentation nor are my lectures around to help until end of september when i go back but i would like to solve this so i can keep developing.

Cheers
Gordon



 
Old August 19th, 2005, 02:16 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Norway.
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please post at bit of the code where the error occurs.

gert

 
Old August 19th, 2005, 09:38 AM
Registered User
 
Join Date: Aug 2005
Location: Edinburgh, Midlothian, United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to synaptic
Default

Code:
template <class T> class VertexLock
{
public:
    // Locks object vertex data with specified lock mode.
    VertexLock( T* obj, T::LockType lock ) :
        m_obj(obj)
    {
        obj->lockVertices( lock );
    }

    // Unlocks object vertex data.
    ~VertexLock()
    {
        m_obj->unlockVertices();
    }

private:
    T* m_obj;    // note! this must be weak pointer because otherwise all models must be allocated to heap

    VertexLock();
    VertexLock( const VertexLock& );
    VertexLock& operator=( const VertexLock& );
};
heres a code snippet, where i have highlighted bold is where one of the problems is





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Moved to Here r_ganesh76 General .NET 2 October 14th, 2009 01:12 AM
error(compiled by vc6.0) in the sample ? tostar BOOK: Professional C++ 1 August 23rd, 2008 02:55 AM
Chapter 8... moved? webmeister BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 September 26th, 2004 03:47 AM
"Object has moved here" message itekcorp ASP.NET 1.0 and 1.1 Basics 0 October 14th, 2003 11:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.