If you're still at the level of thinking that "if Y = friendsyes;" is valid code then a chat room is a project you should shelve for now and concentrate on working through the exercises in your book. Get the language sorted first, then you can work on more complex projects. A chatroom is NOT a simple task suitable for a beginner who doesn't yet know the syntax of if statements.