I am new to c++ classes. I am trying to write a simple e-mail class. below is my .h file. In the cpp all I have is the main which is empty right now since it wont even compile. I am getting cout and endl as an undelclared identifier.

I also have the following includes:

#include "StdAfx.h"
#include <iostream>
#include "Email.h"
#include <fstream>
#include <String>
#include <cstdio>
#include <stdlib.h>

#pragma once

namespace EmailClass


	ref class Email
		void telnet()
			cout << "Testing" << endl; 

Recommended Answers

All 6 Replies

std::cout and std::endl , I believe.

cool that worked now when I do:


I get the same thing.

Member Avatar for iamthwee

Put using namespace std; at the top just after the header declarations.

This is what I get:

error C2871: 'std' : a namespace with this name does not exist

Member Avatar for iamthwee

hmm, maybe I'm wrong.

i have used std before. I am using vs2008 did they change the name to something else or do I need any includes that are missing.

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.