question on string in c++
<p>does     this work on string in c++?</p>

<pre><code>string s="lomi";
cout&lt;&lt;s&lt;&lt;endl;
</code></pre>

<p>what is bad in this code?</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstring&gt;
using namespace std;
int main(){

    string s=string("lomi");
    for (int i=0;i&lt;s.length();i++){


         s[i]= s[i]+3;
    }


    std::cout&lt;&lt;s&lt;&lt;std::endl;









     return 0;
}
</code></pre>

<p>?</p>
