how can make string value in cpp
#include <string>
string hello= "hello you thre :)";
how can make string value in cpp
#include <string>
string hello= "hello you thre :)";
string in cpp
// you want to include <string>
#include <string>
#include <iostream>
int main()
{
string helloWorld = "Hello World!"; // creating string and assigning
std::cout << helloWorld; // will output what you assigned it!
/* you can also use strings with user
input (cin/getline)*/
string namePerson{};
getline(cin, namePerson); // getline allows for multi word input
std::cout << namePerson; // outputs name which person inputted
}
how to declare a string c++
// Include the string library
#include <string>
// Create a string variable
std::string greeting = "Hello";
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us