c++ tag

874 questions


1 answers
297 views
0
c++ class dynamic assignment array constructor

using namespace std;class Student_info{private:char s_name[10];int s_age = 0;char s_university[100];char s_major[100];public:Student_info();Student_info(char* name, int age, char* univ, char* major);b...

c++
1 days ago

1 answers
188 views
0
I want to pass the class type to the function argument

classBaseClass{ // member variable // member function};class FirstClass:public BaseClass {};classSecondClass:publicBaseClass{};classThirdClass:publicBaseClass{};void func(){ autoptr=std::make_shared&l...

c++
2 days ago

1 answers
316 views
0
Unable to determine cause due to differences in output

https://atcoder.jp/contests/abc083/tasks/abc083_bThe output result will be 0 in the code below, but I do not know which part to correct, so I would appreciate it if you could let me know.entering20 2 ...

c++
3 days ago

1 answers
345 views
0
Environment dependent characters? are displayed.

https://atcoder.jp/contests/abc058/tasks/abc058_bIn the code section below, environment dependent characters? will be displayed.Why do environment-dependent characters appear?I would appreciate it if ...

c++
1 weeks ago

1 answers
337 views
0
C++ STRCAT Implementation Partial Question

using namespace std;class My_string {private:char* str;public:My_string(char *a) { str = a; };~My_string() { };int my_strlen() {int b = 0;while (1) {if (str[b] == NULL){break; } b++; } return b;};vo...

c++
1 weeks ago

1 answers
355 views
0
I want to get the number of elements in the array of non-static members of the class as a constant expression

I would like to get the number of elements in the array of non-static members of the class as a constant expression within the non-static member function, but using the std::size function results in a...

c++
1 weeks ago

2 answers
168 views
0
I want to view index, but the data stored in the array is displayed.

https://atcoder.jp/contests/abc068/tasks/abc068_bIn the excerpt code below, I would like to display the index in max, but the data stored in the array will be displayed instead of the index.How should...

c++
1 weeks ago

1 answers
307 views
0
FreeRTOS is not available in SPRESENSE

Currently, I am thinking of using the FreeRTOS library to make it multi-threaded with SPRESENSE's Arduino compatible.However, when I did the verification, the following error occurred and I cannot use...

2 weeks ago

1 answers
184 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
349 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
2 weeks ago
- 1 - »

© 2023 OneMinuteCode. All rights reserved.