Yes I read it, but there are libraries that I don't know yet.
The last code sets the '@' to the needed pos_x , pos_y, and delete the previous pos_x , pos_y , then output it, making it look like an old MS-DOS game engine.
I wrote the code in the forums first, then I copied it to Code::blocks
If I wrote it in Code::blocks directly, it was going to be readable.
Yes I read it, but there are libraries that I don't know yet.
What libraries? - it is only a snippet of pure C++ code. There are no includes - so what do you mean? Maybe the std::cout? I only say that because I am guessing that you may not be used to not having usingnamespace std; in your code.
Your code still has the infinite loop. If you read my code, you will see how to avoid that.
EDIT:
Yemeni Cpluspluser wrote:
I wrote the code in the forums first, then I copied it to Code::blocks
If I wrote it in Code::blocks directly, it was going to be readable.
Write the code in c::b first - make sure to set your indenting to be 4 spaces (not tabs) so that it displays nicely as code in this forum, when you copy it over.
You mean this one?, I copied the other code before.
Yes I got the idea of your code, by using recursive method with functions, I will try to do that tomorrow.
Good night.
// put this before main()
#include <iostream>
void ShowMenu();
int main()
{
// put all this in main()
bool Quit = false;
int MenuSelection = 0;
while (!Quit) {
ShowMenu();
std::cin >> MenuSelection;
switch(MenuSelection) {
case 1 :
//call function to do this menu item
break;
case 2 :
//call function to do this menu item
break;
case 3 :
Quit = true;
std::cout << "Quitting program\n";
return 0; // omit this line if you execution to continue after while loop
break;
default :
std::cout << "Bad Input - options are 1 or 2 or 3\n";
}
}
}
// put this after main()
void ShowMenu() {
std::cout << "CRYPTO GUESS" << std::endl;
std::cout << "Version 2.3\n" << std::endl;
std::cout << "Do you want to enter words yourself or have the computer give you words?" << std::endl;
std::cout << "1) Enter words myself" << std::endl;
std::cout << "2) Have the computer give me words" << std::endl;
std::cout << "3) Quit" << std::endl;
}
@yemeni cpluspluser The code now works I had just assumed it was sort of like a python/tron type of thing, leaving a trail is all. But the code works excellently now! (although I will admit, I had some fun making shapes with the last one lol.) Thanks all!