Skip to content

Latest commit

 

History

History
100 lines (56 loc) · 1.42 KB

CppCompileErrorEndlIsNotAmemberOfStd.md

File metadata and controls

100 lines (56 loc) · 1.42 KB

 

 

 

 

 

 

Compile error.

 

 

 

 

Full error message

 


[C++ Error] Unit1.cpp(3): E2316 'endl' 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 was unable to find the definition of std::endl. #include the header file iostream so it does:

 


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