473,799 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 3323
Banfa
9,065 Recognized Expert Moderator Expert
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 New Member
Looks like you are trying to do C++/CLI or managed c++ in a Native C++ project.
Aug 17 '07 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
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
6743
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 the System.Management namespace. This is where my problem is, I have no System.Management namespace. Could anyone help me locate it or a reference to locate it?
0
755
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. The same code works fine in a standalone app. I have inspected System.Runtime.Remoting.dll with ildasm, and I can see the ....Channels.Http namespace there. I verified that the virtual directory is configured to use v2.0.50727 (the error message...
0
1202
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 area. After I did this on the client side, I was able to load the full object including children also. Now I am consuming the same webservice in VS 2005 developed asp.net application. And it looks like VS 2005 still did not fix the issue of...
0
1065
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 area. After I did this on the client side, I was able to load the full object including children also. Now I am consuming the same webservice in VS 2005 developed asp.net
4
3883
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
1487
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 threads - only happens when built with the 'release' configuration (no debug flag, compiler optimizations in effect) - no problems in debug config here is the error: Unhandled Exception: System.AccessViolationException: Attempted to read or write...
2
3394
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
5049
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: <%@ Application Codebehind="Global.asax.vb" Inherits="<Namespace>." %> I've done a lot of things I've found on the web to no avial, but here are some unique things about what is happening to me.
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10484
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.