456 Posted Topics
Re: Nesting a loop inside another loop is very common. Suppose you have a matrix of integers. Suppose the matrix has 3 rows and 4 integers in each row ... Now if you wanted to print out that matrix, a common C, simple way, would be to code like this: | |
Re: Mary ... Well learning how to write to file and read back from file, is a basic thing to learn, the OP does not seem to be using any file operations here :) Note: a lot of the time, rather then using an if ... elseif ... else structure or … | |
Re: Here is a shell that shows one popular student way to start a menu / choice / switch type program. Note the use of functions to facilitate your logic flow and code developement testing steps. Note the use of getline for input so that the WHOLE line is input. #include … | |
| |
Re: Yoo might like to see a C++ way of coding ... Then, if really need dynamic C strings and a dynamic array, you will have a working proto-type to start. #include <iostream> #include <string> #include <vector> //using namespace std; class Player { std::string name; int id; public: // default and … | |
|
The End.