oh man, wow, i tried doing that i just forgot to initialize found to zero! ahhh. Thanks
Type: Posts; User: lakai02
oh man, wow, i tried doing that i just forgot to initialize found to zero! ahhh. Thanks
after fooling around with Salems version, i noticed that there was no handling of a word that wasnt found. I tried entering a statement somwhere in there but i couldnt figure out where to put it. ...
wow, that was amazing how little code you used! Haha, man i think i took the longest possible route to my goal! I fixed the old one, but yours looks way better and is far more consise. Thanks Salem!
Ok, so i have completed my function that will find a word in a wordsearch, yet the up right diagonal works, while the down left doesn't and im not seeing why. One direction works while the other in...
aww. Well thanks anyway Quzah
Is it possible to #define a value after being scanned in like say if i wanted two values:
printf("print two values\n");
scanf("%i,%i",int1,int2);
/*check values*/
/*then somehow*/
#define...
Yay! Thanks a whole bunch Prelude! Thats much easier than what i was trying. Thank you everyone!
is it possible that after you use fgets with the null or newline character, to trim the string , i was thinking something like this;
for ( i=0; /*some statement that is less than EOF*/ ; i++ )...
is there any way i can read it in by character and store it into a string which can then be tested , instead of reading it in by a string? THANKS ALL.
I have one question left....
if i were to read in a word list from a file that then has to be searched for in the puzzle... how would i do that?
when i use fgets(buffer, n , file) to get a...
nevermind! i think i figured it out. this is my diagonal function...
int findDiag ( char wordsearch[][COLUMNS] , char input[] )
{
int row , column , k ;
char *start , *end;
char...
ok so this is what i have so far, but my diagonal most certainly does not work...
#include <stdio.h>
#include <string.h>
#define ROWS 10
#define COLUMNS 10
void assignSearch( FILE...
thanks prelude,
although I just wanted to know if i had a wordsearch in a 2d character array, could i break it up into line by line.
/*this is my wordsearch */
DKGUWOGAME
MOUNTAINEO...
Hey,
So I want to compare a part of a string with a word, but the part of the string is in an array of characters. How would i send a part of this or just a single string to strcmp() ? Also, i...
Hey all,
So I was just learning about how to open and use files in my programs and i have used a file pointer with fopen() and with that i can use fgets to print out all of the text in the file. ...
hello all,
I was wondering if there is a function that i can call that will get all of the factors of a number, or do i have to make one myself. I started to write one, but i didnt get very far....
this is what i came up with and it seems to work fine:
void shuffleDeck(card *deckptr)
{
card temp, *crdptr;
int i,num;
for(i=0;i<53;i++)
{
i got it working, but now i have another question:
allright so i need a function to shuffle a deck of cards with its only parameter being deckptr:
I was thinking i could find two random numbers...
yah i would like to just pass filldeck an array, but its mandatory that i pass it the pointer so... whatever. Thanks quzah
yeah so i dont know why but the cents 3/4 symbol is a heart in the output. thanks.
ok so i want to write a function that fills a deck of cards and then print out the face values and their number or symbol:
#include <stdio.h>
#include <time.h>
char...
ok on to question two
initbet(int money)
{
int bet;
printf("\nYou have $%i.\n",money);
printf("Place your bet\n");
fflush(stdin);
ok thank you
Ok ive tried to create a simple craps game, yet there are some errors and warnings i cant figure out.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int money=200;
ok this is what i am inserting it into:
for(i=0;i<ROLLS;i++)
{
dieone[i]=rand()%6+1;
dietwo[i]=rand()%6+1;
sum= dieone[i] + dietwo[i];
printf("\n\n%2i ",sum);