Hello everyone. Let me start by sayying thanks for taking your time to read my post and help answer my questions. I've been trying to learn C++ by myself. I've been reading the tutorials over and over till I understand them as best as possiable. I've gotten to 'Strings' so far and I've have not really made any code of my own. I've done all of the tutorials code and understood how the worked. But when I try to piece all that I've learned together to make my own could I seem to get stopped in my tracks.. Anyone have any ideas on how to go about learning/making own easy little programs as you go? I'm trying to learn myself and I dont have anyone to really help me, but I am trying my hardest and will continue to keep trying. I'm trying to make a guessing game, but I seem to get stopped on how to make the game keep going after the frist guess. Here is the code..
Code:#include <iostream> #include <cstring> using namespace std; int main() { char guess1 [13]; cout<<"Welcome to David's Guessing game. The game is simple all you have to do is guess the word I am thinking of.\n"; cin.getline( guess1, 13 ); if (strcmp (guess1, "sha boooiinng") == 0) cout<<"Wow you won on you'r frist try. You must have cheated\n"; else cout<<"You suck you have to try again. Altough you cant cause my programming skills lack the stuff to do it"; cin.get(); }
Can someone help me learn how to make the game like keep going so you can keep guessing? Maybe open my eyes? Also if anyone is feeling really nice and can help me on like AIM or something every once in awhile when I need alittle help as I learn that would be great.. Thanks..