This is the answer for one of the simple function question from my programming lab...
#include <iostream>
using namespace std;
void displayHi();
int main(void)
{
displayHi();
}
void displayHi()
{
cout<<"I love c++";
}
but what i dont understand is why we should put main(void)??
why dont simply type main()??
and by the way,what does it means by put main(void)??
because what i know inside the parenthess if we want to declare variable,it should maybe like this one : main(void variable)...
is that correct, we just put the type,but not declare any variable just like this one : main(void)??
Thank You....