Search:

Type: Posts; User: Isnalla

Search: Search took 0.01 seconds.

  1. Thread: List of Lists

    by Isnalla
    Replies
    11
    Views
    1,330

    List of Lists

    Can anyone give me an sample code of a linked list of linked lists?

    or atleast how to make it, I will try my best to convert your words into lines of codes.

    I am trying to make something like a...
  2. Replies
    4
    Views
    1,653

    seed it... use srand function.. ...

    seed it...

    use srand function..


    srand(time(NULL));
  3. Replies
    1
    Views
    1,345

    unused variable causes lots of problems

    im writing a battleship game.. and i have 2 problems :(
    first,
    here is one of the functions:


    #include <stdio.h>#include <stdlib.h>
    #include <string.h>
    void battle(char p1_base[10][10],char...
  4. Replies
    12
    Views
    1,263

    many thanks! :)

    many thanks! :)
  5. Replies
    12
    Views
    1,263

    i got it! did that ^ then put a getchar(); (on...

    i got it! did that ^ then put a getchar(); (on line95)below scanf("%d", &choice); (line 94)

    seems like the "enter" character goes to scanf("%c",&row);(line 102) when i input the choice.. >.<
  6. Replies
    12
    Views
    1,263

    just removed the typecast at the setShip...

    just removed the typecast at the setShip function. i hope i did right


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


    int main_menu(char board1[10][10],char board2[10][10]){
    ...
  7. Replies
    12
    Views
    1,263

    ^ it compiled.. :) . but it still doesnt print...

    ^ it compiled.. :) . but it still doesnt print those values.. can you see anything wrong? or should i add something ...
  8. Replies
    12
    Views
    1,263

    oh. so can i do something like this instead? ...

    oh. so can i do something like this instead?

    board1[(int)row-A][col-1]='A' ??

    or board1[(int)row-(int)'A'][col-1]='A' ??

    or neither... *sigh* i'm currently studying basic C
    and i just...
  9. Replies
    12
    Views
    1,263

    because a standard battleship game has...

    because a standard battleship game has characters for row and integers for the column,
    so when the user inputs J 5 it would be like 9 4 (J in ASCII is 74.. -65 it will be 9)..
    i dont know if that...
  10. Replies
    12
    Views
    1,263

    i want to set value 'A' from the user's initial...

    i want to set value 'A' from the user's initial input and to the 4 units above it

    EDIT: sorry for no documentation... just started writing this today O_O.
  11. Replies
    12
    Views
    1,263

    2d arrays, setting values doesnt work

    im doing a battleship game program for my project.

    here's my code so far

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


    int main_menu(char board1[10][10],char...
  12. Replies
    2
    Views
    739

    thank you!

    thank you!
  13. Replies
    2
    Views
    739

    problem with menu function

    hello.. im having a problem with my menu function. here's the code:

    int main_menu(){ int choice;
    printf(" _____________\n");
    printf("|--Main Menu--|\n");
    printf("| ...
  14. oh!!!! didn't see that... thanks! :)

    oh!!!! didn't see that... thanks! :)
  15. will compile, will run, but crashes at some point

    here's my code

    #include<stdio.h>#include<stdlib.h>
    #include<string.h>
    #define size 10


    int ask_name(char n[size]){
Results 1 to 15 of 15