c++-faq
What is the difference between a definition and a declaration?
The meaning o开发者_运维问答f both eludes me.A declaration introduces an identifier and describes its type, be it a type, object, or function. A declaration is what the compiler needs to accept refere[详细]
2023-02-15 15:05 分类:问答What's the difference between "STL" and "C++ Standard Library"?
Someone brought this article to my attention that claims (I\'m paraphrasing) the STL term is misused to refer to the entire C++ Standard Library instead of the parts that were taken from SGI STL.[详细]
2023-02-14 20:30 分类:问答When do I use a dot, arrow, or double colon to refer to members of a class in C++?
Coming from other C-derived languages (like Java or C#) to C++, it is at first very confusing that C++ has three ways to refer to members of a class: a::b, a.b, and a->b. When do I use which one of[详细]
2023-02-10 18:35 分类:问答How do I use arrays in C++?
C++ inherited arrays from C where they are used virtually everywhere. C++ provides abstractions that are easier to use and less error-prone (std::vector<T> since C++98 and std::array<T, n>[详细]
2023-02-07 10:26 分类:问答Why is "using namespace std;" considered bad practice?
I have heard using namespace std; is bad practice, and that I should use std::cout and std::cin directly instead.[详细]
2023-02-04 12:20 分类:问答Undefined behavior and sequence points reloaded
Consider this topic a sequel of the following topic: Previous installment Undefined behavior and sequence points[详细]
2023-02-03 01:38 分类:问答What is this weird colon-member (" : ") syntax in the constructor?
Recently I\'ve seen an example like the following: #include <iostream> class Foo { public: int bar;[详细]
2023-01-30 16:27 分类:问答Why do I see strange values when I print uninitialized variables?
In the following code, the variable has no initial value and printed this variable. int var; cout << var << endl;[详细]
2023-01-26 19:47 分类:问答Semantics of flags on basic_ios
I find myself repeatedly baffled by the rdstate() flags - good(), bad(), eof(), fail() - and how they are expressed in basic_ios::operator!, operator bool and operator void*.[详细]
2023-01-26 19:10 分类:问答What is the proper declaration of main in C++?
Questions开发者_JAVA百科 What is the proper signature of the main function in C++? What is the correct return type, and what does it mean to return a value from main?[详细]
2023-01-26 02:39 分类:问答
加载中,请稍侯......