Skip to content

Latest commit

 

History

History
101 lines (56 loc) · 1.36 KB

CppCompileErrorCoutIsNotAmemberOfStd.md

File metadata and controls

101 lines (56 loc) · 1.36 KB

 

 

 

 

 

 

Compile error.

 

 

 

 

 

Full error message

 


[C++ Error] Unit1.htm(3): E2316 'cout' is not a member of 'std'

 

 

 

 

 

Cause

 

IDE: C++ Builder 6.0

Compiler: Borland BCC32.EXE version 6.0.10.157

Project type: Console Application

 


int main() {   std::cout << "Hello world" << std::endl; }

 

 

 

 

 

Solution

 

The compiler does not know the function 'cout'. Add the header file so it does:

 


#include <iostream> int main() {   std::cout << "Hello world" << std::endl; }