I cant get the program to compile
I am getting 'system': identifier not found
I have the following includes
#include "stdafx.h"
#include "Email.h"
#include <iostream>
#include <fstream>
#include <String>
#include <cstdio>
#include <stdlib.h>

#pragma once

using namespace System;

namespace Email {

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

	};
}

It looks like you are grappling with MS crap.

Make sure you compile with /clr command option.

Enjoy.

how about
#include <cstdlib>
instead of
#include <stdlib.h>

and have
using namespace std;

He didn't ask about std, he asked about System.

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.