Watch out for one thing - functions, unlike labels and goto, stack on each other. So the more functions in a row you call, the higher that stack grows. That stack isn't infinite, so eventually you...
Type: Posts; User: Elysia
Watch out for one thing - functions, unlike labels and goto, stack on each other. So the more functions in a row you call, the higher that stack grows. That stack isn't infinite, so eventually you...
But your gotos would like have made it even more difficult to write your program in the end.
You will face a lot of situations with frustration. Programming isn't easy.
I think at the current stage thisisurlife08 is at, you should know functions.
Otherwise you shouldn't tackle such large projects.
If you don't know them... well, step back, read about them,...
Not hard at all. If you need to call the code in main, break out that code into its own function and call that instead of main.
And functions are basics, really. Everyone should know them, and if...
That's why you should get a book.
You may not be a beginner at something else, but in C++, you are and C++ is mostly a low level language that requires a solid understanding to use.
You will do...
Like everyone has been telling you:
int GameStart();
int main()
{
int strikes=0; // to tell the plyers how many wrong guesses
int wordlength; //to tell plyers how long the word is
char...
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int strikes=0; // to tell the plyers how many wrong guesses
int wordlength; //to tell plyers how long the word is...
A prototype only tells the compiler the function exists. Therefore the prototype and the real function (the definition) needs to match.
Then you call the real function. IF there's no prototype, the...
1) Because you can jump all over the place, forth and back, back and forth. It boggles the mind. Leave that code for some time and come back to it. I bet you'll be confused. Goto really has no...
Your mostly unindented goto-riddled using code is giving everyone headaches.
I'll bet you they would be able to help you better if you got rid of the goto and used functions/loops instead.