无法从'std :: string'转换为'System :: Xml :: XmlReader __gc *'

时间:2019-12-03 14:30:06

标签: c++ xml visual-studio-2010 xmlwriter

我正在编写一个程序,使用“ XmlTextWriter”类在C ++中将数据写入XML文件,同时使用局部变量存储属性,我在Visual Studio中收到以下错误消息。

  

XML_read_write.cpp(86):错误C2664:'System :: Xml :: XmlWriter :: WriteAttributes':无法将参数1从'std :: string'转换为'System :: Xml :: XmlReader __gc *'   没有可用的用户定义的转换运算符可以执行此转换,否则无法调用该运算符

期望仅使用“ XmlTextReader”对象,但是我无法将任何数据复制到XmlTextReader对象中。

我的程序:

string test= "Checkin";

writer->WriteAttributes(test, false);

有人可以在这里帮助/建议我吗

0 个答案:

没有答案