ok This is my question , there are In c++ two kind of functions ,right????
which the functions are ?, end what is the diference???
Any help is welcome!!!!
thx in adv.
love,
abyss
ok This is my question , there are In c++ two kind of functions ,right????
which the functions are ?, end what is the diference???
Any help is welcome!!!!
thx in adv.
love,
abyss
Have I crossed the line?
Not sure what you mean by two types of functions. Maybe you mean functions that return a value and functions that don't ( procedures in some languages).
silk.odyssey
It's like saying there are two types of people in this world. Those who like Neil Diamond, and those who don't. You can divide functions into any number of categories.
There are two types of functions in this world... Those that cause a segfault, and those that don't!
On a side note after that random outburst, don't worry about classifying such things. Instead, learn the parts of a function (return-type, owning class (if applicable), name, parameters, and body), and the difference between a declaration and a definition. If you understand how functions work this way, then any arbitrary distinctions between types won't matter.
I think Silk had it. He probably means functions with return values and functions that just do what they do....(I'm not so good with the terminology....)
Code:#include <iostream.h> int var; int test(); int main() { cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n"; cin >> var; return test(); } int test() { if(var == 1) { cout << "Y0u 4r3 t3h 1337\n"; system("PAUSE"); return main(); } else if(var == 2) { cout << "N00B3R!\n"; system("PAUSE"); return main(); } else if(var == 3) { cout << "You were not thought of.\n"; system("PAUSE"); return main(); } else { return 0; }}
Yeah, he probably does.