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 :)