c++ tag

886 questions


1 answers
22 views
0
C++ There is a simple dynamic assignment question.

T *p; int p_size = 5; p = new T[p_size]; if(cnt>p_size-1) multi(p, p_size); void multi(T *x, int p_size) { T *temp; temp = new T[p_size * 2]; for(int i = 0; i< p_size; i++) { temp[i] = x...

c++
2 years ago

1 answers
29 views
0
I would like to ask you how to implement SIP.

They told me to look for SIP for video communication.Once you look at the server level, there is also a SIP servlet in the Java basic API. I wonder what other ways there are.How to implement with a C+...

2 years ago

1 answers
21 views
0
C++ constructor, compiler

#include <iostream> using namespace std; class Point { private: float X; float Y; static int count; public: Point() {}; Point(float a) : X(a), Y(a) { ++count; } Point(const Point& a);...

c++
2 years ago

1 answers
42 views
0
Cannot transfer 2D array as function

Receive a two-dimensional array as a function void myFunction(double** myArray){ myArray[x][y] = 5; etc...}There's a function like thisdouble anArray[10][10];myFunction(anArray)I'm getting an error ...


1 answers
39 views
0
Other than the "/" role in the C++ #include statement

In many projects, Look at the embedded statements, such as #include <abcd/efg.h>.I think this means get me the abcd or efg header file ... which means I don't know the role of the / in the enclo...

2 years ago

1 answers
111 views
0
c++ linked list deduplication, reverse question.

Source to clear if a simple link list has duplicate data.IsEmpty() is a boolean function that asks if the list is zeroLength() is a function that checks the length of the list.The Delete (int Position...


1 answers
117 views
0
How do I call a parent class function in a child class?

Is there a way to call a member function of a parent class in a child class?How can I implement call_print_in_Base below?class Base{public: void print() { cout << i'm base! << endl; }};cla...

2 years ago

2 answers
90 views
0
The lifetime of the C++ lambda function?

#include <iostream>#include <string>using std::cout;using std::cin;using std::endl;decltype(auto) getFunc(){ return [](int n1, int n2) { return n1 + n2; };}decltype(auto) getFuncPtr(){ aut...

2 years ago

1 answers
22 views
0
This is a question about the c++ header files!

I'm making a simple game, and someone said I need headers He made a comprehensive header file including etc. Just pick up the header files you need and include themWhat are the advantages and disadvan...

c++
2 years ago

1 answers
53 views
0
What is the :: before the class name?

::Configuration * tmpCo = m_configurationDB;//pointer to current dbI saw this chordI don't know what the hell :: is doing.If you clear :::declaration of tmpCo as a pointer to an object of the class Co...

2 years ago
« - 63 - »

© 2024 OneMinuteCode. All rights reserved.