c++ tag

886 questions


1 answers
35 views
0
Can I know the number of computer cores through the program?

Regardless of the platform, Is there a way to find out how many cores it is using C/C++ If you don't have that method,Please use it according to the platform.

2 years ago

1 answers
114 views
0
Why do you use the virtual method?

I started learning C++Isn't the virtual method used by the child class to override the parent class's method?You can just override it. Why do you have to use the virtual keyword?


1 answers
112 views
0
Load list of files in directory without 'ls'

I'd like to get a list of files in the directory from C/C++ls I need something other than how to write command

2 years ago

1 answers
116 views
0
Why do you use the const at the end of the method definition?

Why are you using this?I'm confused class Myclass{public: void print() const {}};

2 years ago

1 answers
127 views
0
What is stack allocation and heap allocation in C?

When you get memory allocation, there's a stack allocation and there's a heap allocation. What's the difference?

2 years ago

1 answers
125 views
0
How do I empty the stringstream variable?

I tried it like the source code below, but it didn't work ㅜㅜWhat should I do? std::stringstream m; m.empty(); m.clear();

2 years ago

1 answers
72 views
0
"<:]{%>"What does this bearded man look like?

The source code below runs without any problems.Why?What does that mean?int main(){ <:]{%>;; // <-this}


1 answers
86 views
0
Code that makes errors in the middle

I'm working on a Python program that interacts with errors in the C++ processThe C++ program I made sometimes fails, but sometimes it works fine.The C++ program needs to be consistently brokenIt can b...

2 years ago

1 answers
75 views
0
To initialize global variable std::map

If map is a global variable, how do I initialize it?Should I write static function?

2 years ago

1 answers
82 views
0
Join STL vector

Is there a way to combine multiple STL vectors into one?

2 years ago
« - 34 - »

© 2024 OneMinuteCode. All rights reserved.