我对ObjectARX和c++非常陌生,希望你能帮上忙。
我正在使用AutoCAD 2023和VisualStudio2019。
我已经成功地将我的c++函数编译并加载为ARX,并从AutoLISP内部调用。
(myfunc "Hello World")
我成功地获得了Lacstring_parameter_passed_to_myfunc "Hello“的价值
我使用什么语法来获得Lacstring_parameter_passed_to_myfunc作为std::string的值?
static int myfunc(struct resbuf* rb)
{
AcString Lacstring_parameter_passed_to_myfunc;
if (rb->restype == RTSTR) {
Lacstring_parameter_passed_to_myfunc = rb->resval.rstring;
}
std::string my_string_parameter_passed_to_myfunc = "????????"
// What is the syntax to convert a AcString to a std::string value??
}发布于 2022-10-03 03:59:18
试试这个:
AcString base = _T("testżźę");
CT2CA pszConvertedAnsiString(base);
std::string strStd(pszConvertedAnsiString);https://stackoverflow.com/questions/73922014
复制相似问题