Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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



Reply With Quote
  #2 (permalink)  
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

Reply With Quote
  #3 (permalink)  
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:32 AM.


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