c++ tag

886 questions


2 answers
25 views
0
C/C++ Call By Reference

#include <iostream>using namespace std;int getInput(int *a, int *b, int *c){ cin >> *a; cin>> *b; cin>> *c; return 0;}int maxmin(int n1, int n2, int n3,int *max2, int *min2){ *...

c c++
2 years ago

1 answers
62 views
0
C++ pixel access question.

for (int row = 0; row < result.rows; row++) { uchar* pointer_row = result.ptr<uchar>(row); for (col = 0; col < result.cols; col++) { uchar b = pointer_row[col * 3 + 0]; uchar g = poi...

2 years ago

2 answers
70 views
0
How to get C/C++ numbers and get the sum excluding the smallest and largest numbers.

#include <iostream>using namespace std;int minmax(int num) { int value, sum; int min, max; min = 9999; max = 0; for (int i = 0; i < num; i++) { cout << Enter your values please <&l...

2 years ago

2 answers
22 views
0
It's a c++ question

I want to use the function to find the sum of n, the sum of even numbers up to n, and the sum of odd numbers. Implemented within a function, the main function is output only. When I run it, it says th...

c++
2 years ago

3 answers
76 views
0
c++ generation of random numbers

#include <cstdlib>#include <ctime>#include <iostream>using namespace std;int main() { srand(time(0)); int num = rand()%101; for(int i = 0; i <=9; i++){ cout << num << ...

2 years ago

2 answers
22 views
0
C language question

c++
2 years ago

1 answers
155 views
0
In the c++ question console window, Hello appears in red...

If I run this code, HELLO comes out in red in the console window, but why does it come out like that?Please explain in detail.char red[] = { 0x1b, '[', '1', ';', '3', '1', 'm', 0 };cout << red &...

2 years ago

1 answers
23 views
0
I have a question about c++ copy generators and mobile generators!

Hello! The copy creator and the move creator are asking if this is correct!First, I'm going to put a copy maker in the middlePerson(const Person& c) : : maxValuec.maxValue, valuec.value I put as ...

c++
2 years ago

1 answers
88 views
0
Please tell me the difference between system ("cls") and system ("clear").

The c/c++ erases the system (cls) and system (clear) console screens, so please tell me the difference between the two.

2 years ago

1 answers
103 views
0
c26451 overflow error

Vector2(float _x = 0.0f, float _y = 0.0f): : x(_x), y(_y) {}float Magnitude() {return (float)sqrt(x * x + y * y);}There was an overflow error in return, but I don't know why it's a problem or how to f...

2 years ago
« - 81 - »

© 2024 OneMinuteCode. All rights reserved.