# How to convert a standard C++ string to a XOD XString?

**URL:** <https://forum.xod.io/t/how-to-convert-a-standard-c-string-to-a-xod-xstring/3725>\
**Category:** XOD Programming Questions\
**Created:** [April 3, 2020, 1:55am UTC](https://forum.xod.io/t/how-to-convert-a-standard-c-string-to-a-xod-xstring/3725 "2020-04-03T01:55:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmadsuki](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/ahmadsuki/32/2212_2.png) [@ahmadsuki](https://forum.xod.io/u/ahmadsuki)\
**Post date:** [April 3, 2020, 1:55am UTC](https://forum.xod.io/t/how-to-convert-a-standard-c-string-to-a-xod-xstring/3725/1 "2020-04-03T01:55:11Z")

</div>

I’m facing “a simple” problem to convert traditional C++ string to XOD XString (or List\<char\>) thus emitValue can accept my string to be displayed. I’ve tried many ways but yet to get any solution:

![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/3/325427c51d4a93a494cb3b4638fec778435ea648.png)

This is the error message:  
_C:\Users\uum\AppData\Local\Temp\xod\_temp\_sketchbookT4JCBV\xod\_1585878406923\_sketch\xod\_1585878406923\_sketch.ino: In function ‘void xod::\_\_\_\_trying\_string\_io::evaluate(xod::\_\_\_\_trying\_string\_io::Context)’:_  
_C:\Users\uum\AppData\Local\Temp\xod\_temp\_sketchbookT4JCBV\xod\_1585878406923\_sketch\xod\_1585878406923\_sketch.ino:1036:21: error: conversion from ‘const char [15]’ to non-scalar type ‘xod::XString {aka xod::List}’ requested_

Any help is really appreciated.

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [April 3, 2020, 2:01am UTC](https://forum.xod.io/t/how-to-convert-a-standard-c-string-to-a-xod-xstring/3725/2 "2020-04-03T02:01:36Z")

</div>

format-number (and probably others) has example close to what you are trying to do. You might be able to find other examples that are closer to what you want.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [May 3, 2020, 2:01am UTC](https://forum.xod.io/t/how-to-convert-a-standard-c-string-to-a-xod-xstring/3725/3 "2020-05-03T02:01:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
