Visual 2013.Error C2065: cout: необъявленный идентификатор
#include<iostream>
#include"stdafx.h"
using namespace std;
int main()
{
char Letters[6] = "Hello";
cout << Letters;
}
Источник: Stack Overflow на русском
#include<iostream>
#include"stdafx.h"
using namespace std;
int main()
{
char Letters[6] = "Hello";
cout << Letters;
}
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
char Letters[6] = "Hello";
cout << Letters;
return 0;
}
Этот вариант рабочий. Строка #include "stdafx.h" должна быть в начале.
Кстати, сам код файла stdfx.h:
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
Проверьте, он вам действительно нужен?