Search:

Type: Posts; User: DLH112

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. finally got this to work, though it has too much...

    finally got this to work, though it has too much in main(), I had problems/crashes every other way...


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

    #define nameSize 50
    struct...
  2. Can someone please give me a hint as to what I'm...

    Can someone please give me a hint as to what I'm doing wrong? I've fussed around with this so much and it just won't run properly.


    void readData( Node *p, FILE *input )
    {
    while(fgets(buffer,...
  3. I've restarted it and perhaps found my problem....

    I've restarted it and perhaps found my problem. readData...


    #include <stdio.h>
    #include <stddef.h>
    #include <stdlib.h>
    struct NODE
    {
    struct NODE *link;
    int value;
  4. I know that you're right, and I apologize for the...

    I know that you're right, and I apologize for the um irresponsible request, but I really hate the feeling that just changing 1 or 2 things that I'm overlooking could make it run perfectly.
    I will...
  5. It compiles, but crashes upon running. uses this...

    It compiles, but crashes upon running. uses this text file
    081 1986 71 143 029198 Baum Adam
    015 1968 65 120 020509 Dente Al
    094 1960 74 155 029836 Fresco Al
    098 1986 51 073 037558 Romeo Alf
    090...
  6. that is what my previous assignment was(the basic...

    that is what my previous assignment was(the basic linked list with just a number), and I understand the basics of it like you said. This program that I started with for this assignment is the...
  7. ah okay, i'll rethink it. It's supposed to read...

    ah okay, i'll rethink it. It's supposed to read data from a file(text file) and put each line of that text file as a node on the linked list.
    ------------------Edit--------
    now the readData part...
  8. Right, thanks, that parts settled now. looks like...

    Right, thanks, that parts settled now. looks like this
    struct NODE
    {
    struct NODE *link;
    int id, birthYear, height, weight, salary;
    char firstName[nameSize], lastName[nameSize];
    };...
  9. All right so my first post was a wall of text...

    All right so my first post was a wall of text without a solid question. I've done something now and it needs some fixing.
    I've changed the struct and the insertFirst function but am having a problem...
  10. Changing static array database system to linked list

    I have to modify this program so that it will use a linked list instead of the current system, as well as add in a insertFirst function and a freeList function.


    /* Mini-data base. Somewhat more...
  11. ah okay, I made a second node that the increment...

    ah okay, I made a second node that the increment function is done on before being "traversed". Is there no way to go back to the beginning of the same list/node?



    #include <stdio.h>
    #include...
  12. little emergency help with linked list program

    I unexpectedly had to work a lot on some other project today, and was not able to access the internet or work on this program as much as i had wanted. It is pretty much finished but I'm still having...
  13. Because I need to put the data into the same slot...

    Because I need to put the data into the same slot of the array as the ID number(i.e. employee with ID # 56 goes in data[56]). The way you stated what to do makes it sound like that would be...
  14. Still doesn't work, but maybe with this it's...

    Still doesn't work, but maybe with this it's clearer what I'm trying to accomplish:

    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    typedef struct
    {
    int id;
    ...
  15. I had a feeling I couldn't do that, then standard...

    I had a feeling I couldn't do that, then standard input...


    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    typedef struct
    {
    int id;
    int...
  16. okay, so right now its this: #include ...

    okay, so right now its this:
    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    typedef struct
    {
    int id;
    int birthyear;
    int height;
    ...
  17. help request, structs, arrays, and command line arguments

    I'm trying to make a program that gets several lines of data from standard input, where each line represents an employee.
    Each line looks something like this: 081 1986 71 143 029198 Baum Adam
    (ID...
  18. Replies
    2
    Views
    1,256

    yup, now it works, yay. I wasn't sure if just...

    yup, now it works, yay. I wasn't sure if just argv was right for the first parameter and I tried various forms of image to get it to compile but thank you, that was quick and now it works :].
  19. Replies
    2
    Views
    1,256

    Finishing off an assignment

    My overall assignment is to write a program that draws 4 concentric circles, editing an example program that makes 1 circle. I've gotten it done almost but 1 part is causing me trouble. I need it to...
  20. Thread: Help please

    by DLH112
    Replies
    18
    Views
    2,212

    sorry, I think I've made it better now: ...

    sorry, I think I've made it better now:

    #include <stdlib.h>
    #include <stdio.h>
    main (int argc, char** argv )
    {
    int Key = atoi(argv[2]);
    FILE *in, *out;
    int ch = *argv[1];
  21. Thread: Help please

    by DLH112
    Replies
    18
    Views
    2,212

    here's what I have now, it seems to work, but it...

    here's what I have now, it seems to work, but it might only appear that way. I need to make a file of all 0's to check it.


    #include <stdlib.h>
    #include <stdio.h>
    main (int argc, char** argv )...
  22. Thread: Help please

    by DLH112
    Replies
    18
    Views
    2,212

    wow, i just realized a huge flaw in my logic, the...

    wow, i just realized a huge flaw in my logic, the if statement should look something like this
    if ( argc != 5 || (*argv[1] != 'e' && *argv[1] != 'd') )
  23. Thread: Help please

    by DLH112
    Replies
    18
    Views
    2,212

    ok, I get that that part is what is wrong, but...

    ok, I get that that part is what is wrong, but what would I do to make it check if what they type for that argument E, e, D, or d?

    edit: can I make the parameters of main whatever I want? so there...
  24. Thread: Help please

    by DLH112
    Replies
    18
    Views
    2,212

    Sorry, I was about to leave when i posted it,...

    Sorry, I was about to leave when i posted it, right now the problem is that it just prints "copy source dest"
  25. Thread: Help please

    by DLH112
    Replies
    18
    Views
    2,212

    Help please

    Here's what I'm supposed to do:
    Write a program (in C), which enciphers or deciphers an input file.
    Assume that the input file is any type of file, at all. So you must read it in
    using binary...
Results 1 to 25 of 29
Page 1 of 2 1 2