After staring at your....I hesitate to use the word "code"...for a while I figured you probably meant to write something like this:
string name, yesno;
cout << "Enter your username : ";
cin >> name;
cout << "Invite a friend? (Y/N) : ";
cin >> yesno;
while (yesno != "Y" && yesno != "N")
cout << "Invalid entry; please type Y for Yes or N for No : ";
cin >> yesno;
if (yesno == "Y")
cout << "Enter friend's name : ";
cin >> fname;
cout << "You entered '" << fname << "'. More code needed." << endl;
cout << "What, you want to chat with yourself? Just run Notepad then." << endl;
You are nowhere near Beta by the way. This is not even Alpha. Alpha testing is internal testing of the COMPLETE program that the developers feel is ready to hit the streets but the sensible business types want to test it inhouse away from the developers for a bit. Once they're satisfied (and bugs have been found and fixed, testing repeated and no further bugs found) it's time to try it out in a limited number of real-world scenarios. *This* is Beta testing, where the customers get their hands on a new product and can play with its features but have to be aware that there may still be bugs in.
So assuming the four-year-old is now all "wanna build a car wanna build a car wanna build a car wanna build a car wanna build a car wanna build a car"...
Did you mean this should be LIKE Facebook or UNLIKE Facebook? If unlike, I have no idea what you want it to be like so I'll assume you mean LIKE. Facebook uses a central server to store messages and the users connect through their browsers. What technology are you going to use on the server? Are you going to use a database to store messages or store them in a program's memory? What happens when (not if) the program crashes - all messages will be lost if they're not stored somewhere?
What protocol are you going to use between the clients and the server? Are you going to roll your own or use an existing one? The program above - is this the start of the client application or the server application? Or are you going to use distributed technology to store messages and this will be both? If distributed, this will be UNLIKE Facebook because they do NOT use distributed tech; all your messages are stored on their servers.
I'll stop there because your brain will now have melted. Maybe back to those exercises in Chapter 3? <grin> But your enthusiasm is great; keep thinking of projects, but be aware that any real-world projects are going to be beyond you right now, although there's nothing wrong with playing around with various ideas. I have a number of projects on the go - chess solvers and the like, even an ambitious compiler suite comprising a C compiler, Z80 emulator, assembler, disassembler, linker etc - that'll probably never get finished; I just get them out every so often when I have that itch to scratch.