This is abhinay,
I have following question about inline function.
Thanks in advance.
1. In case of Inline function, function call is replace by its code defination, then
if any inline function have return statement and if it is called by main() then it is suppose to part of main, then why program is not terminated. ?
ex:
Expand|Select|Wrap|Line Numbers
- class Test
- {
- public:
- Test(){}
- inline long print();
- inline void afterPrint();
- };
- long inline Test::print()
- {
- cout<<"In side Print "<<endl;
- return lNo;
- }
- void inline Test::afterPrint()
- {
- cout<<"In side afterPrint "<<endl;
- }
- void main()
- {
- Test test;
- test.print();
- test.afterPrint();
- }
In side Print
In side afterPrint
Regards
Abhinay