Sat 29 Jul 2006
More C++ questions
Some more C++ questions…
What’s wrong with the following:
string& method()
{
return string::string(”Hello!”);
}
What methods would you expect to find in a smart pointer class?
What’s potentially wrong with this:
{
mutex.lock(); // grabs a mutex semaphore
method1();
method2();
mutex.unlock(); // releases the mutex
}
Can you suggest any improvements?

