c++ tag

886 questions


1 answers
262 views
0
Is there a reason why dynamic arrangement should not be declared like this?

The size of the array is determined at compile time, so to declare an array of dynamic sizes int size;scanf(%d, &size);int* arr = (int*)malloc(sizeof(int) * size); I was taught to do this, but eve...


1 answers
501 views
0
In C/C++, if only variable definitions are used, is it Nil?

We are currently running ALDS1_8_A.It's a two-minute search tree.The answer codes are as follows:In the insert function, x is the current comparison node, y is the parent node, and z is inserted.I thi...

c++ c
1 years ago

1 answers
392 views
0
Method of substituting an anonymous function that takes a return value for a C++ function pointer variable

Question detailsRegarding the presentation code, I would like to substitute an anonymous function for the pointer variable related to the code below, but every implementation will fail.How do I define...

c++
1 years ago

1 answers
363 views
0
Error in scanf_s and switch-case statements

#include <stdio.h>int main(void){ int num1, num2; char arithmetic; printf (Please enter 2 numbers and an operator.\n\n); printf (Operators are as follows:\n); printf(plus:+, subtract:-, multiply...

c++
1 years ago

1 answers
315 views
0
COLLISION COORDINATE OBTAINED BY COLLISION OF A PLURALITY OF MOVING OBJECTS IN 2D GAME

Question detailsI'd like to know how to correct the position and draw it in the same way as when two objects collide with each other in a 2D game.ConditionsRectangular, square, etc.I would like to ass...

c++
1 years ago

1 answers
385 views
0
I want to know what the compilation error [expected initializer before 'Render'] means.

Question detailsThere is an error in the source file below, but I do not understand the meaning of this error code.expected initializer before 'Render' What should I do with the initializer that I nee...

c++
1 years ago

1 answers
316 views
0
I want to know what I have to do until the next loop if I finish with a multi-threaded game loop.

Question detailsI'd like to know how to make a game loop process.As it is asynchronous, one of them ends first, so what should I do then?What I checked and foundAn object to be drawn by calculation is...

1 years ago

1 answers
216 views
0
COLLISION COORDINATE OBTAINED BY COLLISION OF A PLURALITY OF MOVING OBJECTS IN 2D GAME

Question detailsI'd like to know how to correct the position and draw it in the same way as when two objects collide with each other in a 2D game.ConditionsRectangular, square, etc.I would like to ass...

c++
1 years ago

1 answers
263 views
0
Inline variables become separate entities for each translation unit

The inline variable inline structure {intx;}y; using an unnamed structure has a different entity (with different addresses) for each translation unit and cannot be shared beyond the translation unit.W...

c++
1 years ago

1 answers
389 views
0
I didn't know why the type name exists in the template I defined myself.

The following implementation was written as the implementation of the iterator_trites structure.Why are there differential_type and value_type types in the namespace of the Iter class?In my opinion, w...

c++
1 years ago
« - 3 - »

© 2024 OneMinuteCode. All rights reserved.