Hi all, this short paragraph of code is to get the user to enter q to quit. But why is the value of c = input_line[0] zero? What is the purpose of this line? Thanks!
char input_line[81];
...
Type: Posts; User: Freshjunior
Hi all, this short paragraph of code is to get the user to enter q to quit. But why is the value of c = input_line[0] zero? What is the purpose of this line? Thanks!
char input_line[81];
...
btw, how does return i work? What do you mean when you "return" this number. Does it mean returning i to the beginning of the function, so i becomes 0 once again?
I understand that the part while (n-- >0) means do the following n times.
But why does
while (card_drawn[i])
i++;
means finding the first available card by skipping past all the...
Hello, I was going through a beginner's guide book on C++ and could not understand exactly how this example works, even after pondering for hours.
This program is a card-dealing program which...
So if I have three shapes (ball, cube, triangle), I have 3x4 possible combinations.
But I would need to use n/4, because the counting is still done in fours. Right?
What I also dont understand is...
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <math.h>
using namespace std;
int rand_0toN1(int n);
void draw_an_item();
char *colors[4] = {"red", "blue", "orange",...
oops sorry. I also just discovered this careless mistake =x.
Hello, I'm a newbie at programming and this example is taken from the book <<C++ Without Fear>>.
The problem is that the programs runs continuously, as though the "number of cards to draw" is...