453 questions
In C++, there are many ways to dynamically allocate, right?Then when should I use malloc and when should I use new?malloc If you finished freeIf new is done, deleteI know I shouldn't mix the two.
C++ class is overriding the virtual extinctionShould I call a parent class extinction within the extinction?MyChildClass::~MyChildClass(){ //Call Parent Class Destructor this->MyBaseClass::~MyBaseC...
If you compile the code below into the gcc -Wall /-Waddress option,warning: the address of ‘i’ will always evaluate as ‘true’ [-Waddress]It appears.I don't know why it's coming up. I don't know what i...
!I'm asking =! not =.We didn't even assign a value in the code belowWhy is false coming out?int main(){ int a; int b = 3; return if(a =!b) { //false cout << a =! b is true! << endl; } els...
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?
I saw a code like this#include <iostream>class Foo {public: int bar; Foo(int num): bar(num) {};};int main(void) { std::cout << Foo(42).bar << std::endl; return 0;}What is written her...
vector that stores doubleI want to convert double to an array that stores it.What function should I use?
The C++ compiler keeps saying No newline at end of file and raising the warning.Why should I enter at the end of the source/header file?It's not even an error. It's annoying and I don't feel like it. ...
void *p = &&abc;I saw a code like this, but I don't know what it's doing. I've seen a lot of double pointers, but doesn't & mean the address?And you need two operands, so this isn't it.Wha...
« | - 12 - | » |
© 2024 OneMinuteCode. All rights reserved.