c++ tag

886 questions


1 answers
305 views
0
I want to know why I can't downcast the base class to a derived class with the type std::shared_ptr<>

Question detailsAs per the title, I would like to know how to downcast the base class to the derived class using the std::shared_ptr<> smart pointer.What I checkedFrom the reference site std::sh...

c++
1 years ago

1 answers
241 views
0
Why do I use a lot of typeef in the STL container of C++ to define member types?

Why do C++ STL containers (vector in the example above) use a lot of typeef internally?I thought that the possibility of misuse would increase by defining member types as new model names in typeef.I w...

c++
1 years ago

1 answers
388 views
0
I want to know why the 0x501 error occurs when I run the GLSL binary in glProgramBinary().

Question detailsI'd like to compile a GLSL shader and run the shader by loading the binary file on the execution side.The following error occurs, what is the cause of this?What is invalid?Confirmation...

1 years ago

2 answers
385 views
0
How do I initialize the value of std::shared_ptr>>?

In the following cases, how do I write the initial value (2*2 array, value 1) for data?structure name { intx; inty;} std::shared_ptr<std::vector<std::vector<std;structure name>>>data...

c++
1 years ago

2 answers
261 views
0
How do I initialize the value of std::shared_ptr>>?

In the following cases, how do I write the initial value (2*2 array, value 1) for data?structure name { intx; inty;} std::shared_ptr<std::vector<std::vector<std;structure name>>>data...

c++
1 years ago

1 answers
420 views
0
I want to know how to make std::vector act as an embedded array GLchar

Question detailsThe following is a compilation of shaders with the source code characters (indeterminate number of characters), and the type is std::shared_ptr<std::vector<GLchar>>. Is the...

c++
1 years ago

1 answers
498 views
0
I would like to know the reason why the makefile link order still results in an undefined reference error.

Question detailsThe following error occurs when I compile, but I don't know why.undefined reference to glfwInitWhat is the cause of the undefined reference?Include files, links, and so on.StatusFrameW...

1 years ago

1 answers
267 views
0
What is the constructor in this code?

include <iostream>#include <cstring>using namespace std;class Person{private: char *name; int age;public: Person(char * myname, int myage){ int len = strlen(myname) + 1; name = new char[...

c++
1 years ago

1 answers
266 views
0
What do you mean this coding argument list doesn't match?

#include <iostream>#include <cstring>using namespace std;private: char * name; char * company; char * tel; int position;public: Namecard(char * n, char * c, char * t, int pos) :position(p)...

c++
1 years ago

1 answers
389 views
0
I want to create a matrix class object that meets certain conditions.

I would like to create a matrix class object in C++ that meets the following conditions:The number of columns for the object is SObjects have 0 or 1 as componentsThe sum of elements in each row of obj...

1 years ago
« - 4 - »

© 2024 OneMinuteCode. All rights reserved.