c++ tag

886 questions


3 answers
25 views
0
To import the output of another program as input when programming

It's a program that throws a number at the bottom. The file name is getHits.sh.#!/bin/bash# # Print 32 bit random numberUPPERBIT=$RANDOMLOWERBIT=$RANDOMUPPERBIT=$(($UPPERBIT<<16))SLEEPTIME=$(($R...

c++
2 years ago

1 answers
24 views
0
How to enter an integer in C++ at once without any spaces

When you get a fixed incomeIn C, scanf (%1d, & array) can be entered at onceIs there a way to get it without any gaps without using scanf on C++?All I know is to receive it as a string and convert...

c++
2 years ago

1 answers
97 views
0
Is it correct to use map:insert() or []?

When adding data to the map I know there are two ways, but I want to know the difference between the two and which one is right (standard?).

2 years ago

1 answers
71 views
0
I want to print out the entire 'double' when I print out the cout

If I run the source code below,It says 3.14159265358979 instead of 3.14159Instead of rounding off the decimal point,What should I do to get the full price?int main(){ double d = 3.14159265358979; cout...


1 answers
127 views
0
Can I convert std::vector> to an array in C++?

As the title says, I want to save vector with pair value as an array, is it possible?

2 years ago

1 answers
84 views
0
I'm a c++ beginner, so I have a lot of questions.

//#include <iostream>#include <string>using namespace std;class Ingredient { string name[6] = { Kimchi, Egg, Ham, Potato, Cheese, Tuna;public: Ingredient(); void getName(); string setName(...

2 years ago

1 answers
21 views
0
About translation unit

Why write the static function of C?In , the word translation section comes out, and I want to know exactly what it means

c++
2 years ago

1 answers
24 views
0
c++ delete[] error crying

#include <iostream>using namespace std;int main(){ int* arr = new int[10]; for (int i=-9; i<=0; i++){ arr[i]=i; } delete [](arr); system(pause);}Why does the delete[] error occur when the a...

c++
2 years ago

1 answers
144 views
0
Is .cc correct as C++ extension or .cpp correct?

Is there a difference between the two?Google C++ Style Guide says to use .ccThere's no explanation.What would be good for Linux?

2 years ago

3 answers
91 views
0
Simple class inheritance question

It's a simple question.class CObj{ virtual int Add();};class CUnit :public CObjs{ virtual int Add(); virtual void Check();};If there is a simple inheritance structure as follows:Can I normally access ...

2 years ago
« - 64 - »

© 2024 OneMinuteCode. All rights reserved.