a debugger?
Type: Posts; User: YayIguess
a debugger?
I'm making a program so when I hook up my electronic drum into my microphone jack, the program will count how many times I've hit a drum and print it to the screen, replacing the previous number. I'm...
something like this?? I think this is what your asking, although I could be totally wrong
for(int i = 0;i < TOTAL_VALUES_IN_MATRIX;i++)
{
if(MATRIX[i]>AVERAGE)
MATRIX[i]=AGERAGE;...
Ok, figured out where the bug was coming from, thanks for your help guys, it was really appreciated.
Thanks, that worked, now I just need to figure out why it thinks there is an extra person playing.
How would I pass Players[10] to the new function, I currently am trying
int get_game_params(player *Player[10], int *num_of_players); //function prototype(?)
get_game_params(&Player[10],...
Okay then, that makes sense why it would have a seg fault. This is still a WIP so I still need to do some stuff (like break it up more, make it do stuff when everyone is out of lives (which is what...
You don't need to have the ASCII codes memorized, I looked it up (which took a total of 10 seconds). It certainly isn't harmful to know what some characters are though.
Do something like this
srand(time(NULL)); //only do this once
(rand()%(90-65))+65; //65 is ASCII for capital A, 90 is ASCII for capital Z
See this
So I have some code that is supposed to be a little exponents game, I have it so whenever you get a question wrong, it should make it the next person's (that has lives left) turn unless no one else...
Thanks for your guy's help, got it working.
Again, I'm making a program that asks for some data then spits out the mean, median, mode and range. However, my mode fuction doesn't seem to be working as intended, as when I use a debugger, I can...
ok, thanks for your help, that error message makes lots of sense now.
So I'm trying to make a program that asks for a set of data (numerical). Then calculates the mean, mode, median and range of the data then outputs it. I decided to split it up between a .h file and a...
Not sure if this is what you're trying to do but couldn't you just create another variable and set the variable to 1 if Y is found in X[] and to zero other wise? Then a simple printf() statement that...
Would that be the reason it wasn't working? I shouldn't have included the fflush()s as they were only put there to see if they would make it work, which they one.
edit: updated OP
The fgets function in this loop:
for(int i = 1; i < players + 1; i++) {
printf("Enter your name player %d\n", i); //ask for name
fgets(player_name[i], sizeof(player_name[i]),...
So, my (Gr. 9) IT teacher wants me to try and take my program and give it a "skin" (by which I'm assuming he means a GUI and despite the fact that my knowledge of C isn't all that in-depth). And...
Ok, that fixed it, thanks.
Thanks, I fixed those issues... don't know why I didn't see them before. I have done what you suggested but the program doesn't print the equation from the switch statement, I have put '%.0f' in...
I have a project for school where I just need to make a game that deals with adding, subtracting etc. integers. So I figured why not program a reletively simple game and learn a thing or two. So...
"I’ve heard that if you know C, you know C+ and C++ except for a few syntax changes."
lol C+ isn't even a language
"Apple tried to turn a functional programming language into an object oriented...
The book that I'm reading has end of chapter exercises. And for this one it wants me to
"Define a two-dimensional array, data[12][5], of type double. Initialize the elements in the first column...
So, I decided to try and just implement this version of minimax straight into my modified program, while I've dramatically cut down the compiler warnings (GCC), I still have one that happens several...
Ok, that fixed the win() issue, I get what I was doing wrong there thanks. Any suggestions for the other two problems I have?