question

Upvotes
Accepted
3 1 1 4

I need to move the parameters of OmmConsumerConfig(0 into a configuration file. I understand that the username is of type const thomsonreuters::ema::access::EmaString. How can I convert a cpp string to that data type?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
11.3k 25 8 13

Hi @liyarthomas

EmaString class is a container of a null terminated Ascii character string. The constructor accept the pointer to the memory containing copied in character string.

thomsonreuters::ema::access::EmaString::EmaString(const char * str,
UInt32 length = EmaString::npos 
)

For std::string, you can call the c_str() function to get a pointer to an array that contains a null-terminated sequence of characters for creating EmaString object.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea