473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

big gap between visual studio 6 and 2003

class myClass
{
int lacement ;
public :
myClass(){};
myClass(const myClass& ref){}
virtual std::vector< std::auto_ptr< myClass getValeur() = 0;
};

typedef std::auto_ptr< myClassmyClassPtr;
class myClassImpl : public myClass
{
public :
myClassImpl(){};
myClassImpl(const myClassImpl& ref){}
virtual std::vector<myClassPtrgetValeur()
{
std::vector<myClassPtrvec;
return vec;
};
};

this code compile under visual studio 6
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(42): error C2558:

class 'std::auto_ptr<_Ty>' : no copy constructor available or copy
constructor is declared 'explicit'
with
[
_Ty=myClass
]
// TEMPLATE FUNCTION _Construct
template<class _T1,
class _T2inline
void _Construct(_T1 _FARQ *_Ptr, const _T2& _Val)
{ // construct object at _Ptr with value _Val
new ((void _FARQ *)_Ptr) _T1(_Val);
}

it tries to construct an abstract class......

Aug 3 '06 #1
4 1731

pascalroca wrote:
[snip]
virtual std::vector< std::auto_ptr< myClass getValeur() = 0;
[snip]
this code compile under visual studio 6
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(42): error C2558:

class 'std::auto_ptr<_Ty>' : no copy constructor available or copy
constructor is declared 'explicit'
[snip]

You can't have std::auto_ptr in a std::vector. This has always been the
case and you're lucky if it did work for you before. You must use for
some other solution. I would recommend you looked at boost which has
several constructs that can help you.

/Peter

Aug 3 '06 #2

pascalroca wrote:
this code compile under visual studio 6
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(42): error C2558:
The move from MSVC 6 to Studio .NET is painful in the extreme, but once
you've done it you won't know how you stood the old compiler. The new
compiler is so much better.

We've managed to remove all of the old template hacks we needed and the
compiler found a lot of low-level bugs that we'd not have spotted - the
sort of things that will work 99% of the time and cause you real
headaches to find otherwise.

Expect to spend ages making the transition, but once done you won't go
back.
K

Aug 4 '06 #3
Kirit Sælensminde wrote:
pascalroca wrote:
>this code compile under visual studio 6
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(42): error C2558:

The move from MSVC 6 to Studio .NET is painful in the extreme, but once
you've done it you won't know how you stood the old compiler. The new
compiler is so much better.
The standards adherance is much better. It's amazing the number
of things that we were "getting away with" even with a staff of
knowledgeable programmers.
Aug 4 '06 #4

Ron Natalie wrote:
Kirit Sælensminde wrote:
pascalroca wrote:
this code compile under visual studio 6
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(42): error C2558:
The move from MSVC 6 to Studio .NET is painful in the extreme, but once
you've done it you won't know how you stood the old compiler. The new
compiler is so much better.
The standards adherance is much better. It's amazing the number
of things that we were "getting away with" even with a staff of
knowledgeable programmers.
Indeed. Shocking but true :-)
K

Aug 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: angelag | last post by:
I am currently taking a college course in Visual Basic.Net and I am a beginner. I bought Visual Studio.Net 2003 to do my homework at home. I built my first project and e-mailed it to myself at...
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
0
by: Ricardo Dias Marques | last post by:
Hi, I have a development machine with Visual Studio .Net 2003 which, as far as I know, targets the 1.1 .Net Framework. Now I need to open some solutions that were created in another machine...
6
by: jemmaq99 | last post by:
Using Visual Studio .NET 2003 I've tried to add a COM reference to a Windows Form project via the Add Reference dialog (specifically the Active DS Type Library) but always get the error message: ...
1
by: xman | last post by:
very hard is fix exactly group for this question.. but I am sure that some of people here have some experience with these compilers: Visual Studio NET Enterprise Architect 2002 and Visual Studio...
1
by: Daniel A. Thomas | last post by:
License required Maybe you don't have this but have one of the products that qualifies for the upgrade such as ... Visual Studio .NET 2003 Professional Visual Studio .NET 2003 Professional...
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
2
by: Herfried K. Wagner [MVP] | last post by:
Hello, There are often questions in this newsgroup posted by VS.NET 2002 users. VS.NET 2002 is "out of date", its successor is VS.NET 2003. There is a special ("cheap") upgrade offer available...
12
by: Nathan Sokalski | last post by:
I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET 2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a *.dll with the name of the Project to a /bin/...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.