c++ tag

886 questions


1 answers
35 views
0
It's a question about c++

one iterator node the class list trying to get inside. But nothing but a shell of the class iterator and (The public and the private iterator nodelist class in.) the Roman trying to use. * node iterat...

c++
2 years ago

1 answers
30 views
0
c++ execution result question

#include<iostream>#include<string>using namespace std;class Car {private: string carNo; int productYear;public: inline Car() { string carNo = ; int productYear = 2016; } Car(string cn, i...

c++ c
2 years ago

1 answers
145 views
0
Which one should I use to sort vectors in descending order?

Please explain which one to use when sorting vectors in descending order, which one do you prefer?std::sort(numbers.begin(), numbers.end(), std::greater<int>());std::sort(numbers.rbegin(), numbe...


1 answers
24 views
0
What's wrong with this? (Related to string output)

int main(int agrc, char const *argv[]) { while (1) { int idx; string sel1, sel2; double W, L, M, D, K, C; // Victory, defeat, total number of plates, damage, gold volume per minute, damage per minu...

c++
2 years ago

1 answers
28 views
0
The fscanf function is weird

int* Load_File(void) { FILE * fp; fp = fopen(Birthday.txt, r); int idx; int arr[100]; for (idx = 0; idx < 58; idx++) { fscanf(fp, %d\n, &arr[idx]); cout << arr[idx] << endl; } ret...

c++
2 years ago

1 answers
73 views
0
How do I avoid overlapping if statements?

What if there's an if statement inside the if statement?It's hard to see /psudo code)bool conditionA = executeStepA(); //executeStepX only runs when the previous step is successfulif (conditionA){ boo...

2 years ago

1 answers
48 views
0
Create string permutation using repeat statements

a,b,c,d,e. These five letters are abcde,abced,abdce,abdec...How do I create permutations in this way, using only repetitive statements?

c c++
2 years ago

1 answers
30 views
0
Using Temporary Objects in c++

The return of the SimpleFuncObj function at the point where the annotation below is displayed is an object, and in the process, a temporary variable is generated and a reference value is returned. And...

c++
2 years ago

1 answers
24 views
0
Can you tell me where the buffer overflow is coming from?

#include <iostream>#include <stdio.h>#include <string.h>// // codeup NO.1098using namespace std;int main(){ int h = 0, w = 0; scanf(%d %d, &h, &w); int** b = new int* [h + 1]...

c++
2 years ago

1 answers
147 views
0
std::endl, which one should I use, '\n'?

If you look at the C++ book,std::cout << Test line << std::endl;You shared a roomThe code that other people madestd::cout << Test line\n;There are more things that I wrote togetherWh...

2 years ago
« - 50 - »

© 2024 OneMinuteCode. All rights reserved.