Search:

Type: Posts; User: seaking1

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    4,977

    Perhaps there is another function to clean up?...

    Perhaps there is another function to clean up?
    Rebuild GTK and have it clean up differently?

    exit() exits - that's what it does.
    What about exit() makes GTK clean up? If it is the action of...
  2. Replies
    3
    Views
    7,112

    I believe you understand correctly. Your...

    I believe you understand correctly. Your proposition will work: see the accessor suggestion below for it will be more versatile.

    The way you have your code, main will not be able to see the struct...
  3. Replies
    4
    Views
    1,036

    Make some system calls. Example: ...

    Make some system calls.

    Example:



    #include <stdio.h>
    #include <sys/types.h>
    #include <dirent.h>
  4. Replies
    3
    Views
    7,112

    You don't have a structure prototype that your...

    You don't have a structure prototype that your main file can see. You should move the


    struct {
    foo;
    };

    to the header file so that all the files can understand what is inside of it.

    You...
  5. You could try to minimize your disk seeks by...

    You could try to minimize your disk seeks by reading in large blocks of data and then adding them to your list. I made something like this but as I read in the first file I sorted into a data...
  6. Several things: (linux* - I see you are win...

    Several things:

    (linux* - I see you are win with your pause)

    fflush(FILE*) flushes the write buffer - it writes the buffer to disk or whatever the driver wants. It does not clear the stdin....
  7. Replies
    4
    Views
    1,704

    Thanks.

    Thanks.
  8. Replies
    4
    Views
    1,704

    omg I did it again. (--Wall ?) Thanks for...

    omg
    I did it again.

    (--Wall ?)

    Thanks for finding my stupid errors for me. Gah!
  9. Replies
    4
    Views
    1,704

    seg fault with nested struct from pointer

    I am having trouble accessing variables from a nested struct and pointer. When this program runs I get a seg fault without anything before it. It doesn't even print out what's up.
    Can someone help...
  10. Replies
    6
    Views
    1,569

    yeah I see I always post before looking at my...

    yeah I see

    I always post before looking at my code

    thanks
  11. Replies
    6
    Views
    1,569

    It declares a char as 32bit? char is supposed to...

    It declares a char as 32bit?
    char is supposed to be 8 bit signed I thought.
  12. Replies
    6
    Views
    1,569

    fread returns strange values

    I have this code segment meant to read the header from a standard ms paint bitmap.
    It reads most of the stuff fine but returns strange values for 0xF9 0xC2 0xD8. (these are actually stored in a...
  13. Replies
    10
    Views
    1,492

    Yes, map is a global.

    Yes, map is a global.
  14. Replies
    10
    Views
    1,492

    That's not what I want to do. :P

    That's not what I want to do. :P
  15. Replies
    10
    Views
    1,492

    Should I be able to do something like this? ...

    Should I be able to do something like this?



    > types.c
    struct s_cell {
    int foo;
    int bar;
    };
  16. Replies
    10
    Views
    1,492

    What I want to do is have the data types defined...

    What I want to do is have the data types defined in a seperate file that will compile to an object alone and then include into another file and set up variables using those data types.

    I want...
  17. Replies
    10
    Views
    1,492

    library with struct definitions

    How would I define some structs in a seperate c file and have them exported?

    I have inside c file stuff that looks like this:
    types.c


    #include "types.h"
    static struct s_pos{
    ...
    };
  18. Replies
    4
    Views
    1,786

    there's an error (i just deleted the =0, i guess...

    there's an error
    (i just deleted the =0, i guess i thought it was a for)

    that was my problem

    (I feel stupid)
  19. Replies
    4
    Views
    1,786

    oah, sorry int str_length(char *str) { ...

    oah, sorry



    int str_length(char *str)
    {
    int i;
    while(str[i] != '\0')
    i++;
    return i;
  20. Replies
    4
    Views
    1,786

    unknown seg fault after malloc

    does anyone have any idea why this gives a segmentation fault?
    (and please tell me why)



    char *cut(char *instr, char delim, int field, int blen)
    {
    printf("monkeys\n");
    int...
  21. Replies
    8
    Views
    30,557

    assign a string to char pointer

    how would i assign a char pointer the value returned by a function that returns a string?



    #include <stdio.h>

    const char *str(void);


    int main()
Results 1 to 21 of 22