Endl and iostream

+1 ♦Avishka RJ ♦™ · February 12, 2015
Where does "endl" declare??
Why we cant use <iostream.h > in C++

Post a Reply

Replies

Oldest  Newest  Rating
+1 Abdullah Nauman · February 17, 2015
Yea, most common command such as endl, are declared in the iosream header file, or the std namespace.
+1 Jake Scaife · February 13, 2015
It's in iostream. Use #include <iostream> rather than #include <iostream.h>
0 ♦Avishka RJ ♦™ · February 12, 2015
Hey , In First question I want to know where does endl declare?? ,
 I mean what is the haedder file that it declares in runtime library
+1 Abdullah Nauman · February 12, 2015


Where does "endl" declare??


endl , is declared at the end of a "cout"  to tell the computer, to end this line, and go to the next one. the command /n is equivilant to endl. Here is an example. 
cout 
Output:  
1. Hello
2. World




If you dont use endl(or /n),  
cout
Output: 
Hello World

Why we cant use <iostream.h > in C++
#include<iostream.h> was part of a very old version of C++, now in later C++ versions, all you have to do is type 

#include
  Just remove the ".h" at the end and it should work. 


Hope I helped! :) 
  • 1

C++

107,093 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator