I'm porting from C to C++ (finally ) and I have a few questions that I was unable to find answers to in my text book.
1.) the inline - I know what it does, but I'm not really sure how to declare it;
I know that when I write the function I need to do the next:
Code:
inline void myclass::function(void)
{
...
}
But how will it look like in the function's declaration? Do I need to place inline there as well like this:
Code:
class myclass {
public:
inline void function(void);
};
2.) Is the inline for class functions only, or can I place it on a global functions as well?
3.) What is the using namespace std; does, and why the text books don't list it in their example programs? Do I really need it?
Thanks alot.