Search:

Type: Posts; User: PTM

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    3,992

    Segmentation fault on linked list

    I created a hashtable with separate chaining where I put structs called Chores, here is my implementation and struct:



    typedef struct Chore{
    char name [8000];
    unsigned long id,...
  2. Replies
    8
    Views
    44,451

    I'm getting very confused... don't know where to...

    I'm getting very confused... don't know where to use each variable, if its an Objectivenode or an Objective, where do I declare them, how to change the previous functions... i got to here:
    ...
  3. Replies
    8
    Views
    44,451

    Yeah you're, is just that I'm new at C and it...

    Yeah you're, is just that I'm new at C and it still confuses me. I want a linked list and a hashtable and it was confusind trying to declare a node and struct to use in both, i eventually would mess...
  4. Replies
    8
    Views
    44,451

    Thanks a lot, it solved the problem. It got to...

    Thanks a lot, it solved the problem. It got to this point because I was testing my functions from Objectives.c and it was always giving segmentation fault and I thought the problem was that I did not...
  5. Replies
    8
    Views
    44,451

    If I put links head = NULL in the main function...

    If I put links head = NULL in the main function it gives the error that is a unused variable, and all those heads I use in Obejctives.c gives the error that they are undeclared
  6. Replies
    8
    Views
    44,451

    Multiple definition of ' ' first defined here

    So I implemented a linked list and a separate chaining hashtable of a struct called Objective, so that I can implement some functions to work with that struct.

    Hashtable.c:


    #include...
  7. Replies
    3
    Views
    4,051

    Sorry if I didn't explain all that well... the...

    Sorry if I didn't explain all that well... the name can be 8000 characters long but most of the time it wont be the case, i have some test files with a lot of deps.
    Here some examples:

    "add 1...
  8. Replies
    3
    Views
    4,051

    Unknown length of console input

    I'm working with a struct called objective, that consists of a char name with a max of 8000 characters, an int id, an int duration and an array of ints called deps that can have between 0 and 9000...
  9. Replies
    1
    Views
    7,156

    Compacting a sparse matrix

    So i'm dealing with sparse matrix and i have to compact in into a single array, for this assignment i created a struct called Point that has a line, column and value and i created an array of Points....
  10. Replies
    9
    Views
    4,246

    Thanks a lot, the "w" and "o" commands are...

    Thanks a lot, the "w" and "o" commands are working, but the "l", "c" and "z" arenīt doing anything, is something wrong with those ifs?
  11. Replies
    9
    Views
    4,246

    Like this? char input[82]; char col...

    Like this?




    char input[82];
    char col [6];
    char name [MAXCARAC];
    unsigned int a, b;
    double c;
  12. Replies
    9
    Views
    4,246

    I got to this point: char input[82];...

    I got to this point:




    char input[82];
    char col [6];
    char name [MAXCARAC];
    unsigned int a, b;
    double c;
  13. Replies
    9
    Views
    4,246

    Scanning chars, ints, doubles and char arrays

    So i have a program that asks the user a command (a letter) to run a specific method, it can be just the letter, a letter and some numbers, or a letter and another word, right now i have this:


    ...
  14. It works but the first command i type doesnīt do...

    It works but the first command i type doesnīt do anything, for example i type "p" and nothing happens and the next command does what the p command was supposed to do and so on. Do you know why itīs...
  15. Will that work? I got to be able to type "a 1 1...

    Will that work? I got to be able to type "a 1 1 1.2", i canīt type "a" then ENTER to let to program inspect the char and then ask me for the params. Sorry if its a dumb question, im fairly new at C.
  16. Scanning a char then unknow number of ints and doubles

    So i have a program and the user is supposed to type in the method he wants used. For example if he types "p" it runs a method that has no parameters but he can also type "a 1 1 1.5" thats meant for...
Results 1 to 16 of 16