Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / October 2005

Tip: Looking for answers? Try searching our database.

Using Vector Class Help!....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 31 Oct 2005 06:33 GMT
I am converting my VC++ MFC to Manage C++ and I am having trouble using the
vector class.

Here is my __gc class

...other headers for System classes ....
#include <algorithm>
#include <vector>
using namespace std;

public __gc class DocumentData{
....other variables
vector<int> m_NextReferenceA;
}

this class is used through out my program, but I get these errors:
(184): error C3633: cannot define 'm_NextReferenceA' as a member of managed
'DocumentData'

(184): error C3633: cannot define 'm_NextReferenceA' as a member of managed
'DocumentData'
       because of the presence of copy constructor
'std::vector<_Ty>::__ctor' on class 'std::vector<_Ty>'
       with
       [
           _Ty=int
       ]
       and
       [
           _Ty=int
       ]
       and
       [
           _Ty=int
       ]
       C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\vector(327) : see declaration of 'std::vector<_Ty>::__ctor'
       with
       [
           _Ty=int
       ]
       and
       [
           _Ty=int
       ]

I need to use this vector class for vital parts in my program.  How do I set
this up properly to use it?....

Thanks for helping me!...
Signature

Eric Miller

Atul - 31 Oct 2005 14:35 GMT
You cannot include unmanaged objects in a managed class, only pointers to
unmanaged objects.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
 &
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------

>I am converting my VC++ MFC to Manage C++ and I am having trouble using the
> vector class.
[quoted text clipped - 50 lines]
>
> Thanks for helping me!...
Eric - 31 Oct 2005 15:21 GMT
Yea, that did it... thank!...
Signature

Eric Miller

> You cannot include unmanaged objects in a managed class, only pointers to
> unmanaged objects.
[quoted text clipped - 62 lines]
> >
> > Thanks for helping me!...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.