473,385 Members | 1,593 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.

System namespace won't load (VisualC++ 2005)

1
Hello, im kind of new in using C++ and I have a question, I tried some tutorials and eventualy came to the part where the system namespace is used, but for some reason it won't work,

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. using namespace std;
  3. using namespace System;
  4.  
  5. int main()
  6. {
  7.     std::cout << "Welcome to C++/CLI Programming. ";
  8.     System::Console::WriteLine("C++/CLI is the new full-featured C++");
  9.  
  10.     return 0;
  11. }
  12.  

but it gives me the error that system namespace can't be found like this :

Expand|Select|Wrap|Line Numbers
  1. 1>------ Build started: Project: test3, Configuration: Debug Win32 ------
  2. 1>Compiling...
  3. 1>test.cpp
  4. 1>d:\mijn documenten\visual studio 2005\projects\test3\test3\test.cpp(3) : error C2871: 'System' : a namespace with this name does not exist
  5. 1>d:\mijn documenten\visual studio 2005\projects\test3\test3\test.cpp(8) : error C2653: 'System' : is not a class or namespace name
  6. 1>d:\mijn documenten\visual studio 2005\projects\test3\test3\test.cpp(8) : error C3861: 'WriteLine': identifier not found
  7. 1>Build log was saved at "file://d:\Mijn documenten\Visual Studio 2005\Projects\test3\test3\Debug\BuildLog.htm"
  8. 1>test3 - 3 error(s), 0 warning(s)
  9. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  10.  

Can someone please explain me why it doesn't work, and how I can fix this ?
Aug 17 '07 #1
3 3311
Banfa
9,065 Expert Mod 8TB
It looks to me like you have not included the correct header file, iostream contains the std namespace but you have not included any other header files.
Aug 17 '07 #2
Darryl
86
Looks like you are trying to do C++/CLI or managed c++ in a Native C++ project.
Aug 17 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
Actually, the code is C#.

The headers are C++.
Aug 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: eric | last post by:
I'm writing a program in C# and found a couple of threads about how to check the status of a printer before sending it any data, to ensure that the printer is ready to print. They say to include...
0
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. ...
0
by: Vinny_Davis | last post by:
Hello - I have a complex object which I am exposing over a webservice on our intranet. In Visual studio 2003 I had to add "" just above my complex object in Reference.CS under Reference.map...
0
by: Vinny_Davis | last post by:
Hello - I have a complex object which I am exposing over a webservice on our intranet. In Visual studio 2003 I had to add "" just above my complex object in Reference.CS under Reference.map...
4
by: John Smith | last post by:
How can I allow someone to cast my C# class into System.String? Is it possible in C#? In C++ I used "operator" keyword to mark C++ member function.
20
by: djc | last post by:
I get this *intermittently* on a utility I am working on. I don't know whats going on but here are a few points about it: - using VS 2005, running on xp sp2 - program uses multiple threadpool...
2
by: Jeff | last post by:
Hey asp.net 2.0 My asp.net 2.0 project has got a assembly load problem: Some of my web.config settings: <membership defaultProvider="AH_MembershipProvider" userIsOnlineTimeWindow="15">
16
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.