[C++] Create a string base on the start ...

Arhiva forumului

Moderatori: Moderator Global, Administrator

Fabr3gas

Cod: Selectaţi tot

#include <string>
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
const string hello;

string s(hello.begin(),hello.end());

// iterate through all of the characters
string::iterator pos;
for (pos = s.begin(); pos != s.end(); ++pos) {
cout << *pos;
}
cout << endl;

}
Încuiat

Înapoi la “Arhiva forum”