I am having some isues adding std as a namespace. I am using vs2008. don't know if that has something to do with it.

#pragma once

//using namespace System;
using namespace std;

namespace Email {

	public ref class Class1
	{
		
	private:
		void telnet ()
		{
			system("dir");
		}

	};
}
#include "stdafx.h"
#include "Email.h"
#include <iostream>
#include <fstream>
#include <String>
//#include <cstdio>
//#include <stdlib.h>


using namespace Email;
//using namespace System;
//using namespace std;

void main()
{
}

I figured it out. when you do a class library std is replaced by system.

It most certainly does exist, and vs2008 is pretty darn standards-compliant.

Be careful about your capitalization. Also, you must include one of the STL headers to see it.

Try:

#include <iostream>
using namespace std;

int main() {
  cout << "Hello world!" << endl;
  return EXIT_SUCCESS;
  }

However, you have changed the current scope by saying using namespace Email; You might want to try referring to it absolutely (not relatively): using namespace ::std; Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.