Would the line ==0 work though if my program is in a loop to be performed three times though? It seems like there could be a change that the first and third rounds of the program could use the same...
Type: Posts; User: helloamuro
Would the line ==0 work though if my program is in a loop to be performed three times though? It seems like there could be a change that the first and third rounds of the program could use the same...
I currently have this for getting the line number. What could I add to it to prevent the same one from being used again
while(fgets(temp,100,phraseFile)!=0){
++count;
}
...
I don't really want to use a 2d array because I have been so often criticized for trying to use them before.
Or is there anyway I can just use a flag to tell if the line has been used or not?
The opening and closing seems to be working, but could someone guide or give me a suggestions as to how to store which lines have been used? Perhaps if I stored the indexes?
I can't use rewind (I'm familiar with it, but it hasn't been covered in my class) but would just opening and closing the file again be sufficient?
I've made your corrections, but there still is a segmentation fault....
Thanks for those warnings. However what I'm really trying to focus on is getting the line. After changing fgets(temp, count, phraseFile) to say while(fgets(temp, 100, phraseFile), what else do I...
Could someone please guide me in how to correct this? Thank you.
int initialize_array(char phrase[], char puzzle[], char clue[]){
FILE* phraseFile; /*input file*/
char temp[100];...
Could you perhaps then tell me with my other user interface problems that I described in the beginning?
Vart,
which method would you recommend?
I should also mention that I would like to know how to clear the screen once a player has chosen a letter and that letter is revealed. Thanks
Here is a screenshot. Sorry about the eraser, there was some personal info down there. I need the program to somehow print in the middle of a 40 row by 80 column screen. Any help is appreciated. ...
So to modify my code I would need to do
while(fgets(temp,100, phraseFile)....but then I'm lost as to what I should do after that. I would appreciate any guidance. I really want to get this project...
Hello,
I really need help with this program. It's a wheel of fortune program. I think I'm really close to finishing it but I really need help adapting it to read a text file of any length and to...
Sorry, I should clarify myself more. By interface I meant how the program looks when it runs. Below I have posted two functions (whose meanings are obvious from their titles). I think that to...
Would it be okay if I posted the code? Because a while back I posted a whole code and I kind of got scolded for it....
Hi,
I was wondering if someone would be willing to help me improve my code's interface its for a wheel of fortune/hangman type game. I won't post the whole code right now, but I just was wondering...
Would I then have to somehow break up that array to find out who was the winner?
So would I just need to declare another array similar to player_turn have it set to 0,0,0 and have player_turn added to it after each round. I really have no clue where to start. Thanks for taking...
Hi
I'm doing a wheel of fortune program in which the player scores are accumulated and tabulated in a 1d array player_turns[]={0,0,0}. The game has three rounds, and I don't know how to print the...
Hi,
For my program I have a function for a wheel of fortune program that takes a line of input from a text file. However, I need to fix it to choose a random line and to break the line up. Could...
Could someone help me with converting the scanf to sscanf or whatever it needs to be converted to please. Especially in the spin function.
I hope this is better. I'm not using the best text editor right now...
#define PHRASE_SIZE 81
#define NUM_PLAYERS 3
#define BANKRUPT 0
#define LOSE_TURN -1
#define VOWEL_COST 250
...
Thanks matsp for correcting that. Every little bit of help is appreciated. I really need help though with the getting the phrase and category randomly part though....Can someone please guide me on...