Forum: C 26 Days Ago |
| Replies: 1 Views: 161 Hello, I've been having problems with my program. I really don't get files that much. This is my code:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<conio.h>
#define max... |
Forum: C Oct 31st, 2009 |
| Replies: 3 Views: 255 Solved it already. The problem was just in the hash function. I think it was because, if the name inputted is too big, the integer the letters will keep incrementing until it exceeds the maximum for... |
Forum: C Oct 31st, 2009 |
| Replies: 3 Views: 255 Yeah. Just to make a hash value in a hard way. :)
Thanks for the advice, I'll take it. |
Forum: C Oct 30th, 2009 |
| Replies: 3 Views: 255 Hello. I've been trying to solve this problem but I can't and my head hurts already. Please help me.
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#define max 12... |
Forum: C Sep 21st, 2009 |
| Replies: 1 Views: 242 Hello. I'm not getting the desired output for my program. The problem is specifically in the file. I can get it to save and load but when I try displaying it, its gonna have a General Protection... |
Forum: C Jul 9th, 2009 |
| Replies: 2 Views: 258 |
Forum: C Jul 9th, 2009 |
| Replies: 2 Views: 258 Hello.. Im trying to pass an integer to a function by adress because I want to change the value of the integer in the function. But it will not.. please help.
Here is my function call:
... |
Forum: C Jul 4th, 2009 |
| Replies: 8 Views: 458 The node containing garbage value appears at the last.. |
Forum: C Jul 4th, 2009 |
| Replies: 8 Views: 458 it reads an extra loop which contains garbage values..
this is my "wright" code fragment:
for(p = L; p != NULL; p=p->next)
fwrite(p, sizeof(celltype), 1, fp);
am I doing this right? |
Forum: C Jul 4th, 2009 |
| Replies: 8 Views: 458 I don't think that will ignore the garbage node..
should I just put a sentinel value in my structure when I wright files instead? |
Forum: C Jul 4th, 2009 |
| Replies: 8 Views: 458 Hello.. How can I read a link list from a file without reading a garbage node? I don't know much about how file works..
This is my code fragment:
for(p = A; flag != 1;)
{
*p = (LIST)... |
Forum: C Jul 2nd, 2009 |
| Replies: 5 Views: 337 sob.. its still not working..
here's my main function and structure:
typedef struct
{
char LN[16];
char FN[24];
char MI; |
Forum: C Jul 2nd, 2009 |
| Replies: 5 Views: 337 hello.. its me again and Im having problems with files again..this time, its with link list..
I can't get my program to display the contents it reads from a file.
Please help..
I want to solve... |
Forum: C Jul 2nd, 2009 |
| Replies: 9 Views: 409 thanks man.. it worked!:)
I need to use tc and borland c for now because its what we are using in school. |
Forum: C Jul 2nd, 2009 |
| Replies: 9 Views: 409 ok here it is..
#include<stdio.h>
#include<string.h>
#include<conio.h>
#define max 20
typedef struct |
Forum: C Jul 2nd, 2009 |
| Replies: 9 Views: 409 @Salem:
Im using borland c
fp == 0 in for loop of function load_file is supposed to find the end of file.. I don't know how to do it so I tried that.
Please help me find a better way..:)
... |
Forum: C Jul 2nd, 2009 |
| Replies: 9 Views: 409 Hello.. im having a problem with my code.. when i save a file, then choose another variable and load the file, then try to display it, all that it display are garbage values.. i know the problem is... |
Forum: C Jan 10th, 2009 |
| Replies: 2 Views: 366 wow! thanks Murtan! that solved the problem. |
Forum: C Jan 9th, 2009 |
| Replies: 2 Views: 366 Hello, Im trying to insert some integers to make a sorted list. I am using cursor-based.
Here is the function:
void insert_sorted(virtualheap *vh, list *l, int x)
{
int temp, *p;
... |
Forum: C Dec 14th, 2008 |
| Replies: 5 Views: 1,148 Problem solved! I solved it on my own! I changed somethings in the insert end function and initialize function. Here is the changed code of the two functions.
void insert_end(virtualheap *vh, list... |
Forum: C Dec 14th, 2008 |
| Replies: 5 Views: 1,148 ok, here it is. by the way, Im using borland c. Its not standard.
void view(virtualheap vh, list l)
{
list n;
for(n = l; n != -1; n = vh.h[n].next)
printf("%d\n", vh.h[n].elem);
} |
Forum: C Dec 14th, 2008 |
| Replies: 5 Views: 1,148 I have a view function in my program, I just removed it here to make this one shorter. Im sure the problem is not in the view function.
The inputs are the numbers the user will press on the keyboard. |
Forum: C Dec 14th, 2008 |
| Replies: 5 Views: 1,148 This is a cursor-based implementation of list inserting at the end. In the program below, the output the program will show me is the last element of my input. It is suppose to show all elements from... |
Forum: C Nov 24th, 2008 |
| Replies: 5 Views: 1,945 thanks ArkM. Now I can do storing and getting data from files with integers and floats. Thanks for the tips too. I'm really slow. It's hard for me to solve obvious errors that I haven't encountered... |
Forum: C Nov 23rd, 2008 |
| Replies: 5 Views: 1,945 hello guys, Im trying to understand how fread and fwrite works. My teacher said that these functions can store/output binaries and texts in files. I know how to do it with string. Im confused with... |