Forum: C Apr 26th, 2007 |
| Replies: 13 Views: 2,002 // strop off the '\n'
if( teamid[strlen(temid)-1] == '\n')
teamid[strlen(temid)-1] = 0;
just a bit confused on how to add this to the code, ive managed to add the first bit but with the... |
Forum: C Apr 24th, 2007 |
| Replies: 13 Views: 2,002 ok sorted out the code and it goes as follows...
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX 12
//struct team_info |
Forum: C Apr 24th, 2007 |
| Replies: 13 Views: 2,002 yep ok well ive put that comma in and still not working |
Forum: C Apr 23rd, 2007 |
| Replies: 13 Views: 2,002 ok added the comma, it compiles but getting the
segmentation fault (core dumped) error when i try and run commands 4. and 5.
:( |
Forum: C Apr 23rd, 2007 |
| Replies: 13 Views: 2,002 #include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX 20
//struct team_info
typedef struct
{ |
Forum: C Mar 6th, 2007 |
| Replies: 13 Views: 2,012 got another quick thing
if ive got the code
printf("\nWin, Loss or Draw ");
fflush(stdout);
scanf( "%d", arrdetails[current_empty_slot].points ); |
Forum: C Mar 6th, 2007 |
| Replies: 13 Views: 2,012 within the while loop i added another if loop so that is checks the max number of teams to see if the limit has been reached. the first loop you had only checks the initial value which is always... |
Forum: C Mar 5th, 2007 |
| Replies: 13 Views: 2,012 so what do i need to use instead of the fflush(null); line?? |
Forum: C Mar 5th, 2007 |
| Replies: 13 Views: 2,012 so how would i go about pointing for example case C to the function
void draw_sorted (void)
so that when b is pressed the table it displayed?? |
Forum: C Mar 4th, 2007 |
| Replies: 13 Views: 2,012 so if i add sommate along the lines of
main()
{
char option, rtn;
option = print_header();
while(option != 'q' && option != 'Q')
{
switch(option)
{ |
Forum: C Mar 4th, 2007 |
| Replies: 13 Views: 2,012 ok thanks for sayin i can use code tags aint hard reli if i can program in c and java :P
so yea that code inputs a football league table and then outputs it unsorted and then sorted.....
...... |
Forum: C Mar 4th, 2007 |
| Replies: 13 Views: 2,012 ok need a bit of help.
got a program to set up football league table and input all the scores etc etc
just tryin to figure a way to add scores and that from there, also the display code seems a... |