+ 1
Doubt
Why do we write #include<iostream>. I mean why don't Developers of c++ wrote it by default?
5 odpowiedzi
+ 5
>> Why is it necessary to write #include<iostream>?
It's not. Actually, in most real cpp files that header is not included. You most likely are using that header for simple input/output aka cin and cout. Your program will do perfectly fine without that include, if you don't use that I/O.
>> Why don't developers of c++ wrote it by default?
Because it's not a feature every cpp file needs included, and because of cpp motto "you don't pay for what you don't use".
+ 3
<iostream> is the source package for input and output, etc. Without it, you wouldn't be able to do those things.
The second question is a question for the developers. 👍😂
+ 3
Iostream is used for input and output. In same case, there is no need of this. suppose, you use c++ with opencv. most of the times, you don't need to add iostream header.
+ 2
You are confusing me.
Your question asks why it is necessary to write it. If you didn't mean to ask that, please edit? 😂
0
No I meant is it related memory or something like that