Am I missing something? (Tutorial #13: Inline Functions)
I just read Tutorial #13: Inline Functions on this website, and I think I might be missing something.
It seemed like inline functions are completely useless. Isn't that the point of a function in the first place? So that you only have to write the code once? Let me use the example used in the tutorial:
Code:
#include <iostream>
using namespace std;
inline void helloWorld(){
cout<<"Hello World!";
}
int main(){
helloWorld();
cin.get();
}
Outputs
Code:
#include <iostream>
using namespace std;
void helloWorld(){
cout<<"Hello World!";
}
int main(){
helloWorld();
cin.get();
}
Outputs
Again, am I missing something here? What's the point of inline functions?