Thread: VC++ 6.0 to .net problems

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    10

    VC++ 6.0 to .net problems

    Hi, I have an application perfectly running on VC++ 6.0 and then if I open it and make a conversion to VC++ 7.1, I get some bizare errors. It might be the way I configure my .net, but I put all the same options that I used in C++ 6.0

    error C2226: syntax error : unexpected type 'Uint32'
    error C2334: unexpected token(s) preceding ':'; skipping apparent function body

    My code is :

    Code:
    #include "Gob_types.h"
    #include <stdio.h>
    #include <fstream>
    #include <memory.h>
    
    .
    .
    .
    
    
    struct FILEBUF
    {
    	Uint32	m_Taille, m_Pos;
    	Uint8*	m_Buffer;
    
    	FILEBUF()
    		: m_Taille(0), m_Pos(0), m_Buffer(NULL) 
    	{
    	}
    
    	FILEBUF(Uint32 Taille, ifstream & F)
    		: m_Taille(Taille), m_Pos(0), m_Buffer(NULL) 
    	{
    		if (Taille)
    		{
    			m_Buffer = new Uint8 [Taille];
    			memset(m_Buffer,0,Taille);
    			F.read(m_Buffer,Taille);
    		}
    	}
    .
    .
    .
    }
    The funny thing about this is that the error showing is on the line FILEBUF(Uint32 Taille, basic_ifstream & F) and not on the first time I use it : Uint32 m_Taille, m_Pos;

    in Gob_types.h I have
    Code:
    .
    .
    .
    #ifndef _SDL_types_h
    	typedef unsigned char	Uint8;
    	typedef signed char		Sint8;
    	typedef unsigned short	Uint16;
    	typedef signed short	Sint16;
    	typedef unsigned int	Uint32;
    	typedef signed int		Sint32;
    .
    .
    .
    Is it Visual 7.1 that I put a bad configuration, a code problem?

    By the way, if I remove the construction FILEBUF(Uint32 Taille, basic_ifstream & F)
    : m_Taille(Taille), m_Pos(0), m_Buffer(NULL)

    I get an C1001 internal compilor error!!

    Thanx for the help
    Last edited by bibiteinfo; 02-01-2006 at 07:11 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. migrate from .Net 2.0 to .Net 3.0
    By George2 in forum C# Programming
    Replies: 3
    Last Post: 07-25-2007, 04:07 AM
  2. Allegro Problems with Visual C++ .net 2003
    By LiNeAr in forum Game Programming
    Replies: 12
    Last Post: 10-16-2005, 06:51 PM
  3. Problems installing GLUT in .NET 2003
    By Kaminaga in forum Game Programming
    Replies: 4
    Last Post: 08-18-2005, 05:33 PM
  4. VS .NET 2003 Is Bloat!
    By UnregdRegd in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 02-29-2004, 10:51 PM
  5. Question about VS 6.0 vs. VS .NET
    By Guyver03 in forum C++ Programming
    Replies: 3
    Last Post: 12-19-2003, 01:42 PM