Search:

Type: Posts; User: edsoneicc

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,735

    Oh found it! printf("\n\nSnake!\n\n"); ...

    Oh found it!



    printf("\n\nSnake!\n\n");
    snakeBattle(bonus);
    bonus=snakeBattle(bonus);
    ...
  2. Replies
    8
    Views
    1,735

    "You won/lost the battle". I want the loop to end...

    "You won/lost the battle". I want the loop to end when "You won/lost the battle" appears. That would happen if the HP<0, which is working well in my program. The problem is, after the "You won/lost...
  3. Replies
    8
    Views
    1,735

    No. It will just appear after the battle. ...

    No. It will just appear after the battle.



    Yes, it's within a loop. Also, I placed getchar() to give me time before it will loop again. Here's the part of it.



    if(b==6)
    {
  4. Replies
    8
    Views
    1,735

    do-while loop ignores break

    This a part of a battle simulation of my game. Why does this loop never ends? How do I fix it? I already placed a break after every return statement but it would just start over from 50 HP. Thanks...
  5. Oh I see. Thanks. I think I should just call the...

    Oh I see. Thanks. I think I should just call the function again to 'break out'.
  6. break not working in a function within a switch

    Hi. I am getting the 'break not working in a function within a switch or loop' error under someFunction(). My code looks something like this


    do
    {
    switch(choice)
    {
    case 1:...
  7. Replies
    4
    Views
    1,655

    rand() function is not really random

    I made a dice program using
    dice=rand()%6 + 1;It gives random values from 1 to 6 but every time I run the program, it just gives me the same set of random values.I tried using ...
  8. Replies
    5
    Views
    1,299

    #include #include void...

    #include <stdio.h>
    #include <string.h>


    void setMap(int map[100][100], int num_row, int num_col); /*prototype*/
    void printMap(int map[100][100], int num_row, int num_col);
    void playGame(int...
  9. Replies
    5
    Views
    1,299

    You, sir, are a genius. Thank you. Now, I just...

    You, sir, are a genius. Thank you. Now, I just need to do the 'move' codes. I'll give you an update later.
  10. Thank you everyone. I did really forget how big...

    Thank you everyone. I did really forget how big the internet is. I realized some would not bother searching in forums as they would just start another thread. Ironically, this thread I started is an...
  11. Replies
    5
    Views
    1,299

    This code works well but I made it as a chain...

    This code works well but I made it as a chain reaction functions by calling the next function inside the setMap function and so on(function in a function in a function--FUNCTIONCEPTION!). I want the...
  12. I see. But this specific part is based on 3...

    I see. But this specific part is based on 3 chain-reaction functions I made, might be very difficult to explain. Thanks for that, I would really use that in the future.
  13. Oh, I see your point there. That hit the spot....

    Oh, I see your point there. That hit the spot. But the problem is, we could both fail if we had the same codes. It's not that I want him to fail, that's why I had the initiative to delete my codes(a...
  14. How do I delete my post or deactivate my account?

    I can't see any delete post in the thread. There's no deactivate account in settings too. It's just I'm being paranoid that someone in my class might see my codes. Thanks.
  15. Replies
    5
    Views
    1,299

    2D Arrays Application

    Hello, I am making a program that lets you "walk" you character by entering the coordinates. The map's border would be the number 8 and the path would be the number 0 and my character would be the...
  16. Transferring non-repeated characters to another string

    #include<stdio.h>#include<string.h>
    #define size 50


    void count(char s[size]);


    main(){
    char str[size];
    int num = 7;
  17. Whoa! Thanks guys! It works now!

    Whoa! Thanks guys! It works now!
  18. What is wrong with my Prime-Composite program?

    Okay so first of all I'm a beginner. This code took me like 3 days. My professor only allows me to use basic functions like if-else, loops(do-while, while and for). This code works perfectly but when...
Results 1 to 18 of 18