<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[I want to understand when we need to write code like below ? i want to know purpose of it ?]]></title><description><![CDATA[<p dir="auto">can any body explain me below code  ?</p>
<pre><code>    std::vector&lt;unsigned char&gt; VectorResponseData;
    VectorResponseData = txnContext-&gt;getPrivateData(); // may be json data
    std::string StrReSponseData(VectorResponseData.begin(),VectorResponseData.end());
</code></pre>
]]></description><link>https://forum.qt.io/topic/136153/i-want-to-understand-when-we-need-to-write-code-like-below-i-want-to-know-purpose-of-it</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 09:34:00 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/136153.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Apr 2022 10:20:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I want to understand when we need to write code like below ? i want to know purpose of it ? on Thu, 28 Apr 2022 10:28:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qt-embedded-developer">@<bdi>Qt-embedded-developer</bdi></a><br />
What is there to ask?  It gets an array of <code>unsigned char</code> into a <code>std::vector</code>, and then builds a <code>std::string</code> out of all the characters.</p>
]]></description><link>https://forum.qt.io/post/712160</link><guid isPermaLink="true">https://forum.qt.io/post/712160</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 28 Apr 2022 10:28:15 GMT</pubDate></item><item><title><![CDATA[Reply to I want to understand when we need to write code like below ? i want to know purpose of it ? on Thu, 28 Apr 2022 10:38:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qt-embedded-developer">@<bdi>Qt-embedded-developer</bdi></a> said in <a href="/post/712162">I want to understand when we need to write code like below ? i want to know purpose of it ?</a>:</p>
<blockquote>
<p dir="auto">in real time ?</p>
</blockquote>
<p dir="auto">What should this mean?</p>
<blockquote>
<p dir="auto">is it used for dynamic array data to store into string format ?</p>
</blockquote>
<p dir="auto">No, it copies al elements from VectorResponseData.begin() to VectorResponseData.end() into a std::string as explained in the <a href="https://www.cplusplus.com/reference/string/string/string/" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a> (7. ctor) ...</p>
]]></description><link>https://forum.qt.io/post/712163</link><guid isPermaLink="true">https://forum.qt.io/post/712163</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 28 Apr 2022 10:38:02 GMT</pubDate></item><item><title><![CDATA[Reply to I want to understand when we need to write code like below ? i want to know purpose of it ? on Thu, 28 Apr 2022 10:35:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> i want to know when we need to do this type of conversation in real time ?</p>
<p dir="auto">is it used for dynamic array data to store into string format ?</p>
]]></description><link>https://forum.qt.io/post/712162</link><guid isPermaLink="true">https://forum.qt.io/post/712162</guid><dc:creator><![CDATA[Qt embedded developer]]></dc:creator><pubDate>Thu, 28 Apr 2022 10:35:58 GMT</pubDate></item><item><title><![CDATA[Reply to I want to understand when we need to write code like below ? i want to know purpose of it ? on Thu, 28 Apr 2022 10:28:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qt-embedded-developer">@<bdi>Qt-embedded-developer</bdi></a><br />
What is there to ask?  It gets an array of <code>unsigned char</code> into a <code>std::vector</code>, and then builds a <code>std::string</code> out of all the characters.</p>
]]></description><link>https://forum.qt.io/post/712160</link><guid isPermaLink="true">https://forum.qt.io/post/712160</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 28 Apr 2022 10:28:15 GMT</pubDate></item></channel></rss>