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 / Languages / Managed C++ / August 2007

Tip: Looking for answers? Try searching our database.

STL in vs 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dk60 - 07 Aug 2007 05:53 GMT
I am trying to use vector in C++ visual studio.net 2005. I do
#include <vector>, but the compiler does not seem to recognize the
corresponding code, when I define
vector<int> my_vector
Is there anything else I should configure in the project?

thanks
Jochen Kalmbach [MVP] - 07 Aug 2007 06:13 GMT
Hi dk60!
> I am trying to use vector in C++ visual studio.net 2005. I do
> #include <vector>, but the compiler does not seem to recognize the
> corresponding code, when I define
> vector<int> my_vector
> Is there anything else I should configure in the project?

STL is normaly inside the namespace "std"... so either declare:

using namespace std;

or write

std::vector<int> m_vector;

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Pixel.to.life - 07 Aug 2007 07:00 GMT
On Aug 6, 10:13 pm, "Jochen Kalmbach [MVP]" <nospam-
Jochen.Kalmb...@holzma.de> wrote:
> Hi dk60!
>
[quoted text clipped - 18 lines]
>     My blog about Win32 and .NET
>    http://blog.kalmbachnet.de/

This has nothing to do with VS.2005. As Jochen suggests, either
specify the std namespace, or specify explicitly where to look for the
definition of vector.
dk60 - 07 Aug 2007 13:17 GMT
On Aug 7, 7:13 am, "Jochen Kalmbach [MVP]" <nospam-
Jochen.Kalmb...@holzma.de> wrote:
> Hi dk60!
>
[quoted text clipped - 18 lines]
>     My blog about Win32 and .NET
>    http://blog.kalmbachnet.de/

Thanks! it works
Dan

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.