Search:

Type: Posts; User: ReggieBE

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    12,308

    lol ok thanks brewbuck and mcnamara, it's fixed !

    lol ok thanks brewbuck and mcnamara, it's fixed !
  2. Replies
    10
    Views
    12,308

    Yes, that was the problem, thnx But it's not...

    Yes, that was the problem, thnx

    But it's not removing the file though .. is there any way to do this without xargx ? Cause it's not installed :\
  3. Replies
    10
    Views
    12,308

    Bash: remove oldest file

    Hi,

    I'm trying to remove the oldest file (whenever there's 14 or more):



    FILECOUNT=`ls | wc -l`;
    if [ $FILECOUNT > 14 ]
    then
    cd "$PATH" && ls -tr | head -n 1 | xargx rm -f;
  4. Replies
    2
    Views
    1,227

    sprintf(len+id ?

    Hi,

    I'm trying to translate some C code to java and trying to understand some code so I could write it. Now I'm not a C expert, so don't laugh at me ;)

    I'm trying to figure out what the line...
  5. Replies
    7
    Views
    2,866

    A nice GUI in C

    I'm trying to find some information about making a nice GUI in c. I'd like to make frames and align my text and so on.

    Anyone knows a good resource ?
  6. Replies
    12
    Views
    2,721

    Yeah, I'm using Dev-C++ and he gives me a hard...

    Yeah, I'm using Dev-C++ and he gives me a hard time aligning sometimes :s

    @Dragon: I tried your code but it still crashes :s

    EDIT: BTW Any other suggestions for a c ide ?
  7. Replies
    12
    Views
    2,721

    Hmm when I run my code in debug mode. Step by...

    Hmm when I run my code in debug mode. Step by Step, it works. But the moment I just run it, it crashes:



    int main(void)
    {
    QUEST* qp = NULL;
    int i,j=0;
    i = get_questions(&qp,...
  8. Replies
    12
    Views
    2,721

    @Dragon: why are you using memcpy ? Isn't this...

    @Dragon: why are you using memcpy ? Isn't this for strings ?
    (Sorry for asking so many questions, but I have to be able to explain every single line for school)
  9. Replies
    12
    Views
    2,721

    @Salem: What do you mean by checking the result ?...

    @Salem: What do you mean by checking the result ? Isn't he always going to get the size of the struct out of the file ?

    UPDATE: Kay got it :o
  10. Replies
    12
    Views
    2,721

    ARgh sorry, I forgot I changed it to fixed sizes...

    ARgh sorry, I forgot I changed it to fixed sizes :D
  11. Replies
    12
    Views
    2,721

    fread struct with unknown size

    Hi,

    I'm trying to read out some structs I saved in a binary file.
    Can I just fread(struct, sizeof(struct)... ?
    I can't find any info about that..

    This crashes (saving to linked list):


    //...
  12. Replies
    2
    Views
    7,283

    does strcat reallocs ?

    I'm experiencing something strange here:
    In the code below I malloced filename to the strlen of the category name, + 4 to add ".dat". When I do that I get stuffing in my string.

    Now my question:...
  13. Replies
    13
    Views
    1,971

    Kay found it. Forgot to add \0 to the last...

    Kay found it. Forgot to add \0 to the last address in substr() :D
  14. Replies
    13
    Views
    1,971

    Oh ok thnx ! Just one question .. I get the...

    Oh ok thnx !
    Just one question .. I get the categories listed, but some junk comes along with it like "Categoryfile=c:\java\.."

    I checked ds->d_name. That's not it. Then I declared tmp with = {...
  15. Replies
    13
    Views
    1,971

    What's t ? char** ?

    What's t ? char** ?
  16. Replies
    13
    Views
    1,971

    @Salem: I did, but it didn't work when I just set...

    @Salem: I did, but it didn't work when I just set cat = NULL .. when I malloced it it worked. Why is that ?

    EDIT: Oooooh ok, I did cat** = NULL. But I have to stel cat* to NULL also, right ?
  17. Replies
    13
    Views
    1,971

    Ok got it. Forgot to malloc cat the first time. ...

    Ok got it. Forgot to malloc cat the first time.

    Working code:


    char** get_categories(void)
    {
    DIR* dp = NULL;
    struct dirent* ds;
    char** cat = NULL;
  18. Replies
    13
    Views
    1,971

    This is what I have now: char**...

    This is what I have now:

    char** get_categories(void)
    {
    DIR* dp = NULL;
    struct dirent* ds;
    char** cat = NULL;
    int i=1;

    dp = opendir("rubrieken/");
  19. Replies
    13
    Views
    1,971

    Thnx for helping me out ! realloc returns...

    Thnx for helping me out !


    realloc returns void, so I guess there's no use to assign it to a variable ?

    I guess the error has something to do with the realloc. Can't debug, Dev-C++ refuses ...
  20. Replies
    13
    Views
    1,971

    Saving chars to array

    I'm trying to save filenames into an array of chars.
    My code seems incorrect, but can't figure out what's wrong :\


    char** get_categories(void)
    {
    DIR* dp;
    struct dirent* ds;
    ...
  21. Replies
    6
    Views
    1,156

    Ok I have another problem now. I tried to save...

    Ok I have another problem now. I tried to save the struct one by one. And this is what I get:

    -----------------------
    DIt is vraag 1 \QTSystem\;C:\Program Files\Java\jdk1.5.0_03\bin;...
  22. Replies
    6
    Views
    1,156

    YES ! That did it :p thnx !

    YES ! That did it :p thnx !
  23. Replies
    6
    Views
    1,156

    Ok, I changed head to &head and also q into &q....

    Ok, I changed head to &head and also q into &q.
    These are the errors I get:


    makequiz2.c: In function `make_quiz':
    makequiz2.c:46: warning: assignment from incompatible pointer type
    ...
  24. Replies
    6
    Views
    1,156

    Pointer confusion

    Ok I'm getting slightly insane here.
    Before I begin to ask my question I will give you some code:


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

    #include "misc.h"
Results 1 to 24 of 24