Search:

Type: Posts; User: marquis1431

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Thread: Black Jack

    by marquis1431
    Replies
    1
    Views
    1,683

    Black Jack

    I can't figure out why i get this error:

    In function âuserinputâ:
    error: too few arguments to function â_IO_getcâ




    #include <stdio.h>
    #include <stdlib.h>
  2. Thread: Stacks

    by marquis1431
    Replies
    3
    Views
    1,329

    Ok I figured that out. now i need to scan in a...

    Ok I figured that out. now i need to scan in a interger expression in postfix form and display its result. push each interger on the stsck. when an operand is encountered the top two operands are...
  3. Thread: Stacks

    by marquis1431
    Replies
    3
    Views
    1,329

    the program works minus retrieve function. i cant...

    the program works minus retrieve function. i cant figure out how to write the retrieve function to do wat i want it to do
  4. Thread: Stacks

    by marquis1431
    Replies
    3
    Views
    1,329

    Stacks

    I need to write function retrieve to return the value at the top of the stack. The stack is not changed. Any suggestions.


    #include <stdio.h>
    #include <stdlib.h>

    typedef char stack_element_t;...
  5. Replies
    2
    Views
    1,157

    Function Return

    How would you return a space from say an if else statement?


    int x;
    char ' ';
    if (x>0)
    winner = 'x'
    printf("winner is %d\n",winner);
    else
    winner = ' ';
  6. Replies
    39
    Views
    5,377

    on the second move for the computer it doens't...

    on the second move for the computer it doens't display it on the board? any suggestions
  7. Replies
    39
    Views
    5,377

    okay I got it back working but it doesn't display...

    okay I got it back working but it doesn't display the computer move twice output


    | |
    ----+---+----
    | |
    ----+---+----
    | |
    Play with X or play with O
    O
  8. Replies
    39
    Views
    5,377

    Something got jacked up. #include ...

    Something got jacked up.


    #include <stdio.h>
    #include <stdlib.h>

    #define NUMBER_OF_SQUARES 9

    char tic_tac_toe[NUMBER_OF_SQUARES]={'0', '1','2', '3', '4', '5','6', '7', '8'};
    void...
  9. Replies
    39
    Views
    5,377

    Sorry int main() { int j =0; ...

    Sorry


    int main()
    {
    int j =0;
    char winner;
    int O;
    clear_board(tic_tac_toe);
    print_board( tic_tac_toe);
  10. Replies
    39
    Views
    5,377

    Still not working output is | | ...

    Still not working output is


    | |
    ----+---+----
    | |
    ----+---+----
    | |
    Play with X or play with O
    O
  11. Replies
    39
    Views
    5,377

    if i wanted to let te computer be 'X' and the...

    if i wanted to let te computer be 'X' and the user be 'O' could I do this?


    int main()
    {
    int j =0;
    char winner;
    int O;
    clear_board(tic_tac_toe);
    ...
  12. Replies
    39
    Views
    5,377

    tabstop....i can say that you are a great person...

    tabstop....i can say that you are a great person for this forum.....It works now....I could not have done it without you...I'm so grateful!!! Thank you sooo much.
  13. Replies
    39
    Views
    5,377

    great suggestions......it doesn't place the 'O"...

    great suggestions......it doesn't place the 'O" on the second iteration


    | |
    ----+---+----
    | |
    ----+---+----
    | |
    Play with X or play with O
    X
  14. Replies
    39
    Views
    5,377

    ok. i removed char winner...

    ok. i removed char winner =get_a_winner(tic_tac_toe); all together and left this char choice =get_user_character(); as is and removed the char from char winner =get_a_winner(tic_tac_toe);......it...
  15. Replies
    39
    Views
    5,377

    Doesn't work like that. program below ...

    Doesn't work like that. program below


    #include <stdio.h>
    #include <stdlib.h>

    #define NUMBER_OF_SQUARES 9

    char tic_tac_toe[NUMBER_OF_SQUARES]={'0', '1','2', '3', '4', '5','6',...
  16. Replies
    39
    Views
    5,377

    I changed to && and tested the program and made X...

    I changed to && and tested the program and made X be the winner but it still doesn't stop when a winner is found???


    Enter what box number that you
    would like to place you move in>
    3
    make...
  17. Replies
    39
    Views
    5,377

    english translation: while(winner != 'X' ||...

    english translation: while(winner != 'X' || winner != 'O');....if the winner is not X or the winner is not O then the program will keep going. If the winner is X or is O the program should execute...
  18. Replies
    39
    Views
    5,377

    ok. i got the get_a_winner functtion to return...

    ok. i got the get_a_winner functtion to return winner that is a char. now is the do while loop.I want the program to keep looping until winner = 'X' or 'O'. When winner is 'X' or 'O' someone has won...
  19. Replies
    39
    Views
    5,377

    thanks tabstop I finally see the light:) Okay now...

    thanks tabstop I finally see the light:) Okay now is this is my new main function. I added function get_a_winner to check a winner and it works. What I want to do is end program when a winner is...
  20. Replies
    39
    Views
    5,377

    ok in main() i changed char choice to char...

    ok in main() i changed char choice to char *choice and user_move(&choice) to user_move(choice).... output now is:


    | |
    ----+---+----
    | |
    ----+---+----
    | |
    Play with X...
  21. Replies
    39
    Views
    5,377

    ok. tabstop when i have it at int this is the...

    ok. tabstop when i have it at int this is the output:


    | |
    ----+---+----
    | |
    ----+---+----
    | |
    Play with X or play with O
    X
  22. Replies
    39
    Views
    5,377

    I got the program to work but now the...

    I got the program to work but now the get_usermove function skips the scanf.It doesn't let me enter a positon to move it just skips it and prints invalid move....any suggestions?


    #include...
  23. Thread: Arrays

    by marquis1431
    Replies
    11
    Views
    1,443

    I changed my scanf()'s to %c when i did that it...

    I changed my scanf()'s to &#37;c when i did that it doesnt allow me to input an positon ont he board. it bypasses the below code and prints invalid move and the new board....what could be wrong with that...
  24. Thread: Arrays

    by marquis1431
    Replies
    11
    Views
    1,443

    i changed my user_move to char user_move(char);...

    i changed my user_move to char user_move(char); and the function to char user_move(char choice)
    now my output is:

    | |
    ----+---+----
    | |
    ----+---+----
    | |
    play with X...
  25. Thread: Arrays

    by marquis1431
    Replies
    11
    Views
    1,443

    Ok here is the program. I'm trying to put the...

    Ok here is the program. I'm trying to put the user's move, either X or O in the array postion that they chose and display the board again with the X or O in that positon. It isn't working though.

    ...
Results 1 to 25 of 41
Page 1 of 2 1 2