I'm learning C++, It has been two months now.
After learning many aspect of the language, I want to practice to make simple program without Graphic UI.
I want to make simple games like MadLibs or MasterMind.
How do I go about doing that without scrolling.
I've read somewhere that they used to do it using arrays, but when I try, that didn't eliminate the scrolling.
How to do it?
[update]
found it.
#include<windows.h>
main()
{
some code....;
system("cls");
some more code;
}
=================
[update]
What I was trying kinda look like this, found this madlib on the internet.
#include<iostream>
#include <string>
using namespace std;
int main()
{
cout << "Welcome\n" << "Enter your name" << endl;
string userName;
getline(cin, userName);
system("cls");
cout << "Hi, " << userName << endl;
cout << "Enter an adjective: ";
string adjective1;
getline(cin, adjective1);
cout << "Enter a noun: ";
string noun1;
getline(cin, noun1);
cout << "Spell a number: ";
string number;
getline(cin,number);
cout << "Enter a noun: ";
string noun2;
getline(cin, noun2);
cout << "Enter an adjective: ";
string adjective2;
getline(cin, adjective2);
cout << "Enter an verb: ";
string verb;
getline(cin, verb);
cout << "Enter a noun: ";
string noun3;
getline(cin, noun3);
cout << "Enter a body part: ";
string bodyPart;
getline(cin, bodyPart);
cout << "Enter an adjective: ";
string adjective3;
getline(cin, adjective3);
system("cls");
cout << "Look, I guarantee there`ll be " << adjective1
<< " times. I guarantee that at some " << noun1
<< ", \n" << number << " or both of us is gonna want to get out of this "
<< noun2 << ". \nBut I also guarantee that if I don`t ask you to be "
<< adjective2 << ", \nI`ll " << verb << " it for the rest of my "
<< noun3 << ", because I know, \nin my " << bodyPart << ", you`re the "
<< adjective3 << " one for me." << endl << endl;
cout << "Thank you!" << endl;
getchar();
return 0;
}
-->In future I'm planning to learn how to make simple menu/frame based from this (kinda like the 'Edit' software in command prompt from old Windows).
-->I also plans to let the user to 'random' the language parts which will generate a word from small dictionary file.