In this line of C++ code ;
what does the question mark mean and the colon meanCode:int permissions = (mode == QSharedMemory::ReadOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS);
Printable View
In this line of C++ code ;
what does the question mark mean and the colon meanCode:int permissions = (mode == QSharedMemory::ReadOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS);
It´s the ternary operator, it´s syntax is "exp ? A : B". When the exp evaluates to true, its return value is A, else it´s B.
thank you all as always you have been most helpful