886 questions
virtual base class, virtual Why is inheritance used?I want to know what it means.class Foo{public: void DoSomething() { /* ... */ }};class Bar : public virtual Foo{public: void DoSpecific() { /* ... *...
I'm just going to copy and paste the sentence from the file.There is an error in my code.And the color changes in the middle What should I do?using namespace std;int main(){ const char* msg = hello m...
I saw the source codeWhat are you doing?#ifndef HEADERFILE_H#define HEADERFILE_H...#endif
When I ran it on Visual Studio 2010 SP1,Source Code 1 operates about 10 times faster than Source Code 2.There are only two lines that change. I don't think there's much differenceWhy is the performanc...
I understand that I have virtual attached to the constructor or other function,I don't know why virtual is used for extinction.When an object disappears, it automatically calls for an inherited class,...
What's the difference between these two in C++?Most of them use the second methodWhy is that?
When I was defining the class, I did it at .hIn boost libaray, everyone defined a class in .hpp, right?Maybe it's because I've never used it like that, but it looked weirdIs there any advantage of usi...
I'm going around the internetgoI saw the C++ code below What does this explicit do for you?class String {public: explicit String (int n); //allocate n bytes String(const char *p); // initialize sobjec...
Looking at other answers, I saw a lot of things like standard or standardWhere can I see standard documents?I wish I could see it on the internet!I searched Cstandard on Google, and only the community...
How do I make a two-dimensional array with new?When it's a one-dimensional arrangement,int* ary = new int[Size]I wrote it like thisin a two-dimensional arrayint** arr = new int[sizeX][sizeY];I can't c...
« | - 35 - | » |
© 2024 OneMinuteCode. All rights reserved.