Answers for "how to make string in c++"

C++
2

string function in c++?

// let's I want to make a string of same char with specific length
// I can use string something like this
string(length,charecter);
//length - is the length of string we want;
//charecter - the charecter that we want;
// example if string(5,'a') --> 'aaaaa'
//if string(3,'g') --> 'ggg'
Posted by: Guest on November-01-2021
0

c++ write string

#include <iostream>

int main() {
	std::cout << "Hello" << std::endl; //endl = end line/new line
    // or
    printf("hello");
    
}
Posted by: Guest on March-02-2020

Code answers related to "how to make string in c++"

Browse Popular Code Answers by Language