Go to last post Go to first unread
Offline Roberto Dias  
#1 Posted : Thursday, May 7, 2015 11:15:21 AM(UTC)
Roberto Dias

Rank: Member

Joined: 4/15/2015(UTC)
Posts: 12
Location: Florianópolis

Was thanked: 5 time(s) in 5 post(s)
Dear Colleagues,

I try modify SampleUaConsole example of UA_SDK

I try to return a return value of UaClient::read() method.

See code below (adapted from SimpleCient.cpp in Examples of UA_SDK)

string output;
readDataValue = readResponse->Results()[0];
WideString x = readDataValue.Value().ToString();
output= readDataValue.Value().ToString().c_str();

The last line cause a type converion error!

Can you help me?
Offline Patrick Griffiths  
#2 Posted : Friday, May 8, 2015 12:36:07 PM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Hi Roberto,

The compiler is telling you that WideString::c_str returns wchar_t* and std::string has no corresponding assignment operator.

Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Matrikon Subscribe  |   Matrikon Unsubscribe  |   Global Unsubscribe  |   Privacy Statement  |   Your Privacy Choices   |   Cookie Notice