'operator>>' Error

Hai. So, I literally just started C++ yesterday, and I was wondering why this program didn't function. It is a username and password generator.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  #include <string>
#include <iostream>

using namespace std;

int main()
{
 string usernamee;
 string passworde;

 cout << "Hello! Please make a username: ";
 cin >> usernamee;

 cout << "Good! Here's your username:" + usernamee;

 cout << "Now let's make a password. Please make a password: ";
 cin >> passworde;

 cout >> "Great! This is your username: " + usernamee;
 cout >> "And this is your password: " + passworde endl;
 return 0;
}

So, if anyone knows, please tell me. :D
your >> operators are wong the arrow should point in the direction the data needs to go. For example cout << "Hello" we wan't Hello printed to cout so the arrows point to cout << . On the other hand when we do cin >> passwords we want to input the data into password so the arrows point to passwords
cin >> passwords
I hope that makes sense.

1
2
	cout << "Great! This is your username: " + usernamee;
	cout << "And this is your password: " + passworde << endl;


Oh! xD That was a silly mistake. I always forget when I'm writing C++ code. Thanks a lot!
Topic archived. No new replies allowed.