Hi all,
I would like to do the same as QT when for some class it is obliged to give a variable name.
For example QReadLocker, QWriteLocker, QMutexLocker.
It is not possible to declare
QReadWriteLock *myReadWriteLock = new QReadWriteLock();
QReadLocker( myReadWriteLock );
To copy to clipboard, switch view to plain text mode
but you have to give a variable name
QReadWriteLock *myReadWriteLock = new QReadWriteLock();
QReadLocker myReadLocker( myReadWriteLock );
To copy to clipboard, switch view to plain text mode
How is it achieved? I can't figure what in the code is done to obtain this behaviour.
Thanks for your help, I am delighted to learn something new in c++!
-- pium
Bookmarks