在C++中,可以使用以下三種方法聲明和賦值string變量:
std::string str = "Hello, World!";
std::string str("Hello, World!");
這些方法都可以用來聲明和初始化一個字符串變量,并將其賦值為特定的字符串。