886 questions
How does C++ call the constructor of a parent class (even a parent's parent) in a child class?In Java, we could have called the parent class constructor on the first lineWhat should I do with C++
[Which is faster, (1) or (2)?I thought of this while looking at for (;;) { //Something to be done repeatedly}I've seen a lot of codes like this, but I haven't seen them write in while(true).I think wh...
When you run the following source code:As I intended, there should be 6 molesThere are 8 pictures. Why is that?#include <stdio.h>#include <sys/types.h>#include <unistd.h>int main(voi...
I know that the sleep(x) function of C++ POSIX is sleep in secondsI want to do sleep in milliseconds, but is there a function like this?
I usuallyint main()We share a roomIf you're working on C++ IDE,Make the main function int main(int argc, char *argv[]) automatically.The factor is when you call a function, but the main function is ex...
The string-related function parameters in the C/C++ STL are:You used size_t instead of int/ unsigned intWhy is that? Is there anything good about it?
Assume ClassName is a TestTest fTest;Test *sTest;Does the compiler automatically call destructors only for objects assigned to the stack?So the fTest calls the extinction on its own by the compiler?In...
Hello, I am a student who is learning programming at the university.This is an error that occurred while working on the team project last time, but I'm asking you a question because I think the projec...
What's the difference between declaring and defining?Is it just the difference between having {} and not having it?
Is there an easier way to initialize all object member variables to zero?Now struct Snapshot{ double x; int y ;};int main(){ struct Snapshot mystruct; mystruct.x = 0; mystruct.y = 0;}They're resettin...
« | - 72 - | » |
© 2024 OneMinuteCode. All rights reserved.