Advertisement

06.05.2006 at 06:05PM PDT, ID: 21875720
[x]
Attachment Details

Why I can't use "cout" in Visual C++

Asked by csound in Microsoft Visual C++.Net

Tags: cout, visual, use

I've written the following code using Visual C++, Console Based application for Win32.

The code gives "Compiler Error C2065  'identifier' : undeclared identifier".
What could be the reson for this to happen?


#include <iostream.h>
#include <string.h>
#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{
      char *s="Hello world";
      cout<<strstr(s, "wo")<<endl;

      string s( "TEST" );      

      return 0;
}

Start Free Trial
 
 
[+][-]06.05.2006 at 06:08PM PDT, ID: 16838398

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C++.Net
Tags: cout, visual, use
Sign Up Now!
Solution Provided By: Axter
Participating Experts: 3
Solution Grade: A
 
 
[+][-]06.05.2006 at 06:09PM PDT, ID: 16838402

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2006 at 06:10PM PDT, ID: 16838407

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.10.2006 at 04:57AM PDT, ID: 16876777

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.27.2006 at 06:07AM PDT, ID: 16992111

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2006 at 05:36PM PDT, ID: 17142885

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.22.2006 at 01:08AM PDT, ID: 17159188

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32