c++ tag

886 questions


1 answers
95 views
0
Which is better, class or structure in C++?

When do you write structure and when do you write class?

2 years ago

1 answers
130 views
0
How to thread easily in C++

Instead of using a thread library like C,Looking for C++ style (object-oriented) thread objects.Please teach me the easiest way to thread in C++!Is there anyone who can post an example of a program wh...

2 years ago

1 answers
86 views
0
What is std::move() used for?

The question I want to ask is std::move()This is.

2 years ago

1 answers
133 views
0
How far should I put the const of the function parameter?

How much const should I write?Should I use all the variables that don't change?Even on a single line of code?void printValue(const bool b) { cout << b << endl; }Does writing like this real...

2 years ago

1 answers
116 views
0
To find out if a specific string exists in a string

When there is a variable of string typeHow do I find out if there is a specific string in it?, for example,Hello, It's me, for the me true, ., the ???? The false, such as .I'd like you to find the ind...

2 years ago

1 answers
132 views
0
Differences between virtual functions and pure virtual functions

How are virtual functions different from pure virtual functions?Please tell me what it means to use the two

2 years ago

1 answers
75 views
0
To detect OS (OS X/Linux/Windows, etc.) on a C preprocessor?

I'm going to make a C/C++ code that supports multiple platformsYou want to determine which platform the preprocessor is using.Where can I find relevant information?


1 answers
79 views
0
Why did you define TRUE and FALSE macros like this?

I saw in the book that TRUE/FALSE was defined like this, but I don't know the reason. #define TRUE '/'/'/' #define FALSE '-'-'-'What does this mean?Why can you write that one-zero?

2 years ago

1 answers
115 views
0
How to break multiple repetitive statements at the same time

From the source code below,Is there a way to get out of the overlapped repeat door at once using break?int main(){ for(int i=0; i<A; i++){ //... for (int j=0 ; j<B; j++) { //... for (int k=0...


1 answers
98 views
0
How to access std::map to auto?

std::vector<int> numbers = { 1, 2, 3, 4, 5, 6, 7 };for ( auto xyz : numbers ){ std::cout << xyz << std::endl;}In C++0x, vector for for if you turn the xyz door like this, int type w...

2 years ago
« - 37 - »

© 2024 OneMinuteCode. All rights reserved.