初学C++,请问这个哪个地方错了?对string类不是很了解。。。
#include<iostream>#include<string.h>
struct Candybar
{
string pp;
double zhl;
int hl;
};
int main()
{
using namespace std;
Candybar snake={"mocha munch",2.3,350};
cout << snake.pp << endl;
cout << snake.zhl << endl;
cout << snake.hl << endl;
return 0;
}