大约有 12,000 项符合查询结果(耗时:0.0220秒) [XML]
Is Meyers' implementation of the Singleton pattern thread safe?
...
In C++11, it is thread safe. According to the standard, §6.7 [stmt.dcl] p4:
If control enters
the declaration concurrently while the variable is being initialized, the concurrent execution shall wait for completion of the...
C++ multiline string literal
Is there any way to have multi-line plain-text, constant literals in C++, à la Perl? Maybe some parsing trick with #include ing a file? I can't think of one, but boy, that would be nice. I know it'll be in C++0x.
...
How do exceptions work (behind the scenes) in c++
...ng, I decided to actually look at the generated code with a small piece of C++ code and a somewhat old Linux install.
class MyException
{
public:
MyException() { }
~MyException() { }
};
void my_throwing_function(bool throwit)
{
if (throwit)
throw MyException();
}
void another_...
What does the Q_OBJECT macro do? Why do all Qt objects need this macro?
...ion:
The Meta-Object Compiler, moc, is the
program that handles Qt's C++
extensions.
The moc tool reads a C++ header file.
If it finds one or more class
declarations that contain the Q_OBJECT
macro, it produces a C++ source file
containing the meta-object code for
those classe...
dynamic_cast and static_cast in C++
I am quite confused with the dynamic_cast keyword in C++.
10 Answers
10
...
What are the advantages of using nullptr?
...
void f(nullptr_t); //an overload to handle nullptr argument!!!
1. In C++, NULL is defined as #define NULL 0, so it is basically int, that is why f(int) is called.
share
|
improve this answer
...
How to get current time and date in C++?
Is there a cross-platform way to get the current date and time in C++?
24 Answers
24
...
Empty Visual Studio Project?
...
The Visual C++ project types has an "Empty Project" in the "General" category.
It comes up with several empty folders ("Header Files", "Resource Files", "Source Files") that are just 'filters' (they aren't on the file system). You can...
C++ Object Instantiation
I'm a C programmer trying to understand C++. Many tutorials demonstrate object instantiation using a snippet such as:
9 An...
Why are #ifndef and #define used in C++ header files?
...
Not the answer you're looking for? Browse other questions tagged c++ c c-preprocessor or ask your own question.