what is the function of #include
It allows you to use some functions that are an extension of the built-in functions. These include some type conversion, random number generation, memory management, talking with the environment (system("cls") fits here), some search/sort methods, some integer math like absolute value, and some multibyte functions.
so let me get this straight...system("cls") wont work without that specific header?
Exactly. And the best way to make sure that that's true is to take it out and run your program.
well is there a clean screen function that does not require a certain header?
and yup i've tried it...however i do remember one time when i used system("cls") without that header...wonder how that happened
Not that I know of, though I'm not exactly a C++ guru. Is there a reason why you won't want to include it? Including a bunch of libraries that extend functionality is pretty par for the course...it's what makes languages like, say, Python extremely powerful. If you don't know how to do something, there's a good chance someone else has already done it and you can just import their functions.
well i tend to forget things haha..and for less codes to remember..idk
anyway...thank you very much :D
Join our real-time social learning platform and learn together with your friends!