886 questions
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? ㅠ
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...
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...
#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...
#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...
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...
#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...
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...
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...
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...
« | - 85 - | » |
© 2024 OneMinuteCode. All rights reserved.