![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++ beginner
Drscq
STRIVE FOR MY DREAM
展开
-
The collection for interesting problem when using C++
q1:The outputs:WorldWorldThe corresponding codes#include <iostream>using namespace std;void print_buffer(char *buffer[], int n){ for(int i = 0; i < n; i++){ cout << buffer[i] << endl; }}int main(){原创 2022-05-08 11:14:11 · 199 阅读 · 0 评论 -
The implementation of progress bar in C++style
The performance (the insights)The corresponding codes#include <string>#include <iostream>typedef long long int TYPE_INDEX;void progress_bar(TYPE_INDEX current, TYPE_INDEX total, std::string name){ if (current < total - 1){ std::cou原创 2022-05-04 10:17:48 · 596 阅读 · 0 评论 -
How to write some data into a file without erasing the original content
The description of the problemI was ready to replace some data in a file and I also hope the original content has been conserved.The first try and its failuresThe codes#include <iostream>#include <fstream>int main(){ // test std::io原创 2022-05-03 09:57:36 · 115 阅读 · 0 评论 -
The basic use of random_shuffle()
Just look at the codes#include <iostream>#include <algorithm>#include <vector>int main(){ std::vector<std::string> v = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u原创 2022-05-02 11:25:13 · 202 阅读 · 0 评论 -
The basic use of if statement in C++ by using diagrams
Now, I will translate it into C++ program. If you experience this phase, you will know that the computer programing is juat like kind of language the function of which is just like the logic thinking.The outputs:Please enter a whole number: 45The ...原创 2021-12-06 19:06:29 · 73 阅读 · 0 评论 -
easy way to transform your plaintext into ciphertext
The outputs:The codes://use ASCII value to transform plaintext into ciphertext#include <iostream>#include <iomanip>#include <cstring>#include <vector>#include <algorithm>using namespace std;void transFromStrToASC原创 2021-11-30 22:08:56 · 207 阅读 · 0 评论 -
notebook for C++ beginner for codebeauty
``the basic inputs and outputs and basic data types and the function of variables原创 2021-11-30 08:59:19 · 170 阅读 · 0 评论 -
The episodes for C++ beginners
1. 如何使用cout在C++的代码里面:outputs:the codes:// c++ for beginner/* what is C++ (general purpose, complied and case-sensitive) C++ understandable and easy to use, fast execution of demanding tasks. the source codes need to be complied into ma.原创 2021-11-30 08:57:56 · 175 阅读 · 0 评论