0

what data type can be used for entering string in c++.after declaration i am going to use cin

8th Oct 2018, 1:14 PM
lakshay
2 ответов
0
you can use traditional char array, which the characters is limited to its size char str[10]; or std::string, std::string itself is a class representing a sequences of characters std::string str; //example std::string input; std::cin>>input; //or char input[10]; // can hold 9 characters std::cin>>input
8th Oct 2018, 1:41 PM
Taste
Taste - avatar
0
what is tge syntax? pls give me a program as ecample
10th Oct 2018, 11:38 AM
lakshay