+ 1
we cant define function before using it??
ex; int main() { printsomething();} void printsomething{ cout<<"hi hello"; } if it is any eror helpme plsss but how will answer correct if i use void first int last..
3 Réponses
+ 2
void printsomething();
int main
{
return 0;
}
void printsomething()
{
cout<<endl;
}
+ 2
you must declare a "prototype" of the funtion before main so the compiler know that the funtion is defined after main.
void printsomething(); //prototype
int main(){}
void printsomething(){
//definition here
}
+ 1
what is it???