|
From: Ioannis V. <no...@ya...> - 2002-02-18 07:41:08
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Rashan Jibowu
> Sent: Sunday, February 17, 2002 11:04 PM
> To: dev...@li...
> Subject: [Dev-C++] A Couple of Questions
>
>
> Hey Fellow Dev C++ Users:
>
> I have a couple of questions. Perhaps you can help me with them.
>
> 1. How do I clear the screen (MS-DOS) before each time I run,
> or re-run a
> program?
I assume C++.
#include <cstdlib>
...
using namespace std; or using std::system;
system("cls");
>
> 2. How do I use libraries in a C++ program?
You #include the appropriate header files and then you use the
functions/data structures you want.
>
> 3. Why would a programmer want several separate source files
> to be compiled
> into one program? Why not just keep all of the source code in
> one file?
Imagine a program of 100.000 lines of code. At every simple change you
would have to recompile all the code while keeping things in separate
files you would recompile only the file you changed. Except of that
keeping things separated in files according to what they do, makes it
easier to locate them.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
|