c++读这一段话并保存为字符串:You have 2 parcels to Cainiao StationPlease with 10-1-3125 1-5-4453 pickthem up before 1700
Here is the C++ code to read and save the given paragraph as a string:
#include <iostream>
#include <string>
int main() {
std::string paragraph = "You have 2 parcels to Cainiao Station.\nPlease with 10-1-3125, 1-5-4453 pick\nthem up before 17:00.";
std::cout << paragraph << std::endl;
return 0;
}
This code declares a string variable named "paragraph" and assigns the given paragraph to it. Then, it outputs the string using std::cout.
原文地址: https://www.cveoy.top/t/topic/hYI4 著作权归作者所有。请勿转载和采集!