c++ tag

886 questions


1 answers
77 views
0
I have a c++ language beginner question.

Even if you enter numbers that do not fall apart by dividing them into 10 and 4, the decimal point does not come out properly. How can I get a decimal point? ㅠ

2 years ago

1 answers
57 views
0
I wonder why atoi is performed without error without c++ cstdlib.

I am solving the problem of changing the char* array to int.I knew that atoi() was included in cstdlib, and When I used the atoi in the professor's ppt, cstdlib was always included, During this assign...

2 years ago

1 answers
31 views
0
C++ LNK1120 1 unverifiable external reference. There's an error. Why is that?

Huffman.cpp#include Huffman.hbool Node::operator()(const Node* lhs, const Node* rhs) const { return lhs->cnt > rhs->cnt;}Huffman::~Huffman() { std::stack<Node*> st; st.push(binTree); wh...

2 years ago

1 answers
19 views
0
Use c++ template It's very basic Help me

#include<iostream>#include <list>using namespace std;template<typename T>T getSum(T list[], int n) { T sum = 0; for (int i = 0; i < n; i++) sum += list[i]; return sum; }int m...

c++
2 years ago

1 answers
26 views
0
Timeout with ++ operator

#include<iostream>using namespace std;class Time {private: int hours; int minutes;public: Time() : minutes(0) {}; ~Time() {}; Time() :hours(0), minutes(0) {} Time(int h, int m) : hours{ h }, min...

c++
2 years ago

1 answers
67 views
0
Initialize to 2D array element 0.0C language

When you declare a two-dimensional array dynamic assignment and enter the number of rows and columns, you want all the elements in the array to be initialized to 0.0, but I'm not sure what's wrong. vo...


1 answers
24 views
0
I'm asking you a question about the C++ beginner's ASCII code

#include <stdio.h>int main() { printf(%c + %c = %c\n, '2','3', '2' +'3'); //1 printf(%c + %c = %c\n, '2', '3', '2' + 3); //2}In 1, the ASCII value of 2 is 50 and the ASCII value of 3 is 51 so if...

c++
2 years ago

1 answers
143 views
0
c++ novice scanf_s C6066, C6273, C6328 error question

Sorry for the incorrect title. I don't know what to say about the topic.#include <iostream>using namespace std;int main() { cout << Copy the word 'two' as it is entered. Just use two words...

2 years ago

1 answers
117 views
0
c, I wonder how the value returned from the c++ function is transferred to the main function

int number(int * x){ Return a value of return *x; // a}int main(){ int a= 1; int b; b= number(&a);}In this case, if you copy the value of a to the variable b and return it, right?But I wonder when...

2 years ago

1 answers
57 views
0
Calculate array length within C language function

Declares an integer array of length 10 within the main function and forwards it to the func function to output different lengths of the calculated array and the calculated array length within the main...

2 years ago
« - 85 - »

© 2024 OneMinuteCode. All rights reserved.