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...
Type: Posts; User: Isnalla
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...
seed it...
use srand function..
srand(time(NULL));
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...
many thanks! :)
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.. >.<
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]){
...
^ it compiled.. :) . but it still doesnt print those values.. can you see anything wrong? or should i add something ...
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...
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...
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.
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...
thank you!
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("| ...
oh!!!! didn't see that... thanks! :)
here's my code
#include<stdio.h>#include<stdlib.h>
#include<string.h>
#define size 10
int ask_name(char n[size]){