单选题:关于用string定义字符串,下列选项中错误的是\_\_\_\_。
关于用string定义字符串,下列选项中错误的是\_\_\_\_。 @[D](2)
A. string s; s = "hello C++";
B. string s = "hello C++";
C. string s("hello C++");
D. string s["hello C++"];
A.string s; s = "hello C++";
B.string s = "hello C++";
C.string s("hello C++");
D.string s["hello C++"];
答案:D
A. string s; s = "hello C++";
B. string s = "hello C++";
C. string s("hello C++");
D. string s["hello C++"];
A.string s; s = "hello C++";
B.string s = "hello C++";
C.string s("hello C++");
D.string s["hello C++"];
答案:D