Hi. Getting into c++. Made a program that printed a 'o', then had a delay, then backspaced to erase the o, then spaced and printed another o. Ended up having it move across the screen, disappearing at the end using a modulus statement, and printing again on the next line. Not a great program, but here is my question: what do I need to know to print a maze on that screen. I could simply use a cout << "***** ***** ****" etc and make it that way, but I would rather use something like peek and poke (old reference to pet computers) to have more control. My simple goal is to make a maze and use keys to get out of it, without being able to go thru walls. Any help is appreciated.....please point me in the right direction. Thanks!
TY for the reply. Not sure about that yet.....still new to this, but I looked up vectors and realize there is still much for me to read. Shorter question.....
When you compile and run the c++ program, the smaller doslike screen appear. Is there any way to 'poke' a character like 20 down and 40 over?
How do you manipulate characters on this screen (like mae one appear at 34 down, 23 right, then change it to something else) Is this possible??
I would suggest the same answer actually, make a coordinate system. where empty spots is a ' ' character. just do a
vector< vector<char> >
if you are more comfortable with arrays, Tho they are evil. Then you just make a algoritm to insert a character at certain positions. I can help you with it but i suggest that you try it out for yourself. I dont think there are any easy ways to accomplish this.
Best luck :)
EDIT: i almost forgot, the last character in the X rows should always be '\n' so that you get a new line