Hi all,
1. In C++, how can we print "Hello World" say 100 times witout using any loops (for, while/do while, for_each or recursion)?
2. I need to make a Base class underivavle. Could somebody tell me why "virtual" keyword is necessary in following code snippet?
#include <vector>
#include <iostream>
class Base;
class Helper{
friend class Base;
Helper(){}
Helper(const Helper& LFQ){}
};
class Base : public virtual Helper{
public:
Base(){}
};
class Der : public Base{};
int main(){
Base b;
Der d;
return 0;
}
Thanks
Prem