How to define a string variable in C++

c++, string

Solution

C++ supplies a `string` class that can be used like this:

#include <string>
#include <iostream>

int main() {
    std::string Something = "Some text";
    std::cout << Something << std::endl;
}

Problem

I have been working with VB for a while now. Now I'm giving C++ a shot, i have came across strings, i cant seem to find a way to declare a string. For example in VB: ``` Dim Something As String = "Some text" ``` Or ``` Dim Something As String = ListBox1.SelectedItem ``` Whats the equivalent to the code above in C++ ? Any help is appreciated.

Original source