ඒ කියන්නේ අපි මෙවා ඕනෑම ප්රෝග්රෑම් එකක් ලියනකොට මතක තබා ගත යුතු දේවල්? මේවා අපි මතකයේ තියාගත යුතුයි නේද?
machan
this means you are including the header file of the iostream library.
so you can use std::cin and std::cout objects. There are other libraries too
you could include their header files when you using them.
Code:
#include <unistd.h> // this is a unix header file //
#include <stdio.h> // this is the old "C" library. In C++ also you'll need this
#include <glut.h> // when doing OpenGL programming you will need this.
// and more
what a header file does is it have a extern declarations to some functions
or variables. It's just a declaration not a definition. The definition is at a
binary file [ we call these libraries ,more specifically static libraries].
And about the main thing , yes it should be keep on your mind.
There is something called C++ standard. You could have these following two
forms of the main method.
Code:
int main(void);
int main( int argc, char **argv);
and C++ standard also tells that you can't overload or re-declare
or use both at once. It's not like the first case , because it's specified
in the C++ specification.
If not clear , feel free to ask again.
--thanks in advance--