Search:

Type: Posts; User: sifeet

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,083

    I guess you were asking me, who started this...

    I guess you were asking me, who started this thread. I use MinGW. and I write in Xemacs.
    well. I still have the same problem. I removed scanf . and use only getchar.
    I can not get the whole word...
  2. Replies
    10
    Views
    1,083

    yes, it does compile! I just maybe missed the ";"...

    yes, it does compile! I just maybe missed the ";" sign when copy-pasting. and those unreferenced variables are for the other part of the code which I put comment sign around. and strangely it is not...
  3. Replies
    10
    Views
    1,083

    sorry :P here it comes the whole program....

    sorry :P here it comes the whole program.
    (actually not the whole. but I'm still working on this part.)



    #include<stdio.h>
    #include<stdlib.h>
    #include<stdbool.h>
    #include<time.h>
  4. Replies
    10
    Views
    1,083

    watz wrong here?

    Hey,
    This is the part of my code for Hangman game where player make a correct guess and the program should display it as (for ex) _ _ _ s _ _ s _

    len is the lenght of the word.
    word is the word...
  5. Thread: stdin !

    by sifeet
    Replies
    11
    Views
    1,905

    It's working now =D thanks a lot! =)

    It's working now =D thanks a lot! =)
  6. Thread: stdin !

    by sifeet
    Replies
    11
    Views
    1,905

    int main(){ char ch[20]; int i,j; char*...

    int main(){
    char ch[20];
    int i,j;
    char* flt[9][20];
    FILE *sep;
    sep=fopen("hangman.dat","r");
    for(i=0;i<9;i++){
    for(j=0;j<20;j++){
    flt[i][j]= fgets(ch,20,sep);
    }
  7. Thread: stdin !

    by sifeet
    Replies
    11
    Views
    1,905

    tnx for d reply, but we haven't reached that far...

    tnx for d reply, but we haven't reached that far i C yet. I mean we haven't learned abt 2D array or allocated memory.
    So i'm wondering if there is another easier way to do this.
  8. Thread: stdin !

    by sifeet
    Replies
    11
    Views
    1,905

    ok, I'm using fgets now in the code, and I try to...

    ok, I'm using fgets now in the code, and I try to save each line (only one word in each line) as an element in the array "flt" . but all elements of the array become the last line/word! I mean they...
  9. Thread: stdin !

    by sifeet
    Replies
    11
    Views
    1,905

    Sorry for the wrong title, I can not change it...

    Sorry for the wrong title, I can not change it now ! I meant exactly the opposite! :D
    anyway...
    I know how to use random() or srandom(). My problem is , how to turn the words in the file to...
  10. Thread: stdin !

    by sifeet
    Replies
    11
    Views
    1,905

    stdin !

    Hi,
    I'm reading from a text file in my code(It's only 10 different words in that). The code should random a word from the text. how do I do that?
    Can I somehow turn the text into an array of...
  11. Thread: Syntax error !

    by sifeet
    Replies
    2
    Views
    977

    Thanks =)

    Thanks =)
  12. Thread: Syntax error !

    by sifeet
    Replies
    2
    Views
    977

    Syntax error !

    Hi,
    This code is supposed to calculate the dot product of two 3-dimensional vectors.
    I get syntax error in line 29. (syntax error before ']' token)

    #include<stdio.h>
    #include<stdbool.h>...
  13. Replies
    9
    Views
    3,696

    yepp! I see that now! :"> tnx for the help! ...

    yepp! I see that now! :"> tnx for the help!

    Now I should find out how to use the result of a function in another one. You said this about the variabel slumptal which I used in 2 different...
  14. Replies
    9
    Views
    3,696

    Hmmmm, I really have no clue! The human_choice...

    Hmmmm, I really have no clue! The human_choice function prints the message and this function is the first function in the Main function. still not in a loop ...
    although in the function winner I...
  15. Replies
    9
    Views
    3,696

    Hi again, I'm still struggling with this code!...

    Hi again,
    I'm still struggling with this code! I used the tips that Mats gave me. Now when I run the program, I write in my choice, computer randoms its choice and then instead of printing the...
  16. Replies
    9
    Views
    3,696

    I removed them and get no errors no more =) but...

    I removed them and get no errors no more =) but when I execute the program it's no good!
    and it's certainly because of my other mistakes u said.
    ok, I'm trying to use the result from the...
  17. Replies
    9
    Views
    3,696

    stone,scissors,paper!

    Hi,
    I'm trying to write a code for the game Stone-Scissors-Paper.
    I faced some problems when it comes to announcing the winner. I get a syntax error in line 62.
    I'll appreciate it if someone help...
  18. Thread: function

    by sifeet
    Replies
    2
    Views
    795

    Thanks alot for d answer =)

    Thanks alot for d answer =)
  19. Thread: function

    by sifeet
    Replies
    2
    Views
    795

    function

    Hi,
    There is this exercise which I have to make an own function in it.
    It goes like this:
    sum(n) = 1+2+3+...+n
    Here is the code I wrote. I get a syntax error in line 14. also an error in line 13...
  20. Replies
    9
    Views
    1,218

    tnx for d link, very helpful cause I get that...

    tnx for d link, very helpful cause I get that problem alot ;) but this time it is not the command window which disappears, it's the program that ends it self ;like if I have a break or sth in the...
  21. Replies
    9
    Views
    1,218

    ooops! I was being careless forgetting "&" in...

    ooops! I was being careless forgetting "&" in scanf.
    but tnx to your explanations I know now why I should use it =)
    but there's another problem too. When the program asks abt the year, It just...
  22. Replies
    9
    Views
    1,218

    Tnx for the help. I should have used int instead...

    Tnx for the help.
    I should have used int instead of float.(right?) cause now I don't get that error longer.
    And I used scanf to read "year" instead of getchar. But now I get this error :
    "format...
  23. Replies
    9
    Views
    1,218

    can't find why this code ain't working!

    Hi,
    This is a program finds out the date for Eastern. I get these two errors when compiling:
    -invalid operands to binary % (line 14 and 16)
    -int format,double arg<arg 2> (line 19)
    I don't know...
  24. Replies
    8
    Views
    1,852

    Sorry, I didn't even think abt sending my code ! ...

    Sorry, I didn't even think abt sending my code ! thoughtless done!
    Here is the code.
    I can't go any further. the only thing I've done here is to get the ascii numbers (in decimal form 0 to 127) I...
  25. Replies
    8
    Views
    1,852

    A very beginner question!

    Hi,
    I'm stuck in two exercises and need help.
    The first one is to write a code which prints out the ASCII-tabel. I have no clue on this question.
    The second one is to write a code which counts the...
Results 1 to 25 of 25