Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.18 seconds.

  1. For some corruption issues, you could try using a...

    For some corruption issues, you could try using a 'data breakpoint' in GDB.
  2. Replies
    1
    Views
    72

    You should probably have the volatile modifier,...

    You should probably have the volatile modifier, since from your description it appears that the variable is being changed asynchronously to your program.
  3. Thread: typedef struct

    by Salem
    Replies
    6
    Views
    108

    What's to explain? The second one just doesn't...

    What's to explain?

    The second one just doesn't compile.
  4. Thread: typedef struct

    by Salem
    Replies
    6
    Views
    108

    No..

    No..
  5. This isn't a free homework site. You need to...

    This isn't a free homework site.

    You need to at least make an effort towards your goal.
  6. Thread: typedef struct

    by Salem
    Replies
    6
    Views
    108

    Yes.

    Yes.
  7. Replies
    7
    Views
    141

    You make it complicated by trying to do it all...

    You make it complicated by trying to do it all yourself, and not making use of established libraries to do all the work for you.
  8. Replies
    3
    Views
    146

    Maybe things like void add(node **head, char...

    Maybe things like


    void add(node **head, char *name, int priority, int burst)
    {
    Task *taskNew = malloc(sizeof(Task));
    // int value=0;
    // __sync_fetch_and_add(&value,1);
    // no idea why...
  9. Replies
    7
    Views
    184

    Yeah, that's no answer. With the operator...

    Yeah, that's no answer.

    With the operator precedence you have, fCreate ends up as 0 or 1, neither of which are good things to pass to fclose.
    if (fCreate = ( fopen(e_F_Name, "r") == NULL ) )

    ...
  10. Replies
    7
    Views
    141

    Which OS? Which Compiler? Are you looking to...

    Which OS?
    Which Compiler?

    Are you looking to leverage all the goodies that your current platform provides.
    PlaySound function (Windows) | Microsoft Docs

    Or are you going really low level and...
  11. Replies
    3
    Views
    146

    Your 'struct node head' thing needs to travel...

    Your 'struct node head' thing needs to travel between all the functions.

    All your add() function does is create an empty list, append one task to it, then throw the whole lot away with a memory...
  12. Replies
    7
    Views
    155

    So do you get any actual useful information out...

    So do you get any actual useful information out of codewars - you know, more than "it doesn't work"?

    Also, I'm guessing "abc#d##c" isn't the actual (or only) string being tested.
    You need to take...
  13. Replies
    7
    Views
    155

    Do you want the actual string "ac", or just...

    Do you want the actual string "ac", or just something that prints as "ac" because it's got backspace characters in it.

    Such as "abc\bd\b\bc"
  14. Replies
    2
    Views
    159

    Use two loops. while (...

    Use two loops.


    while ( fgets(buff,SIZE,dosya) ) {
    if ( buff[0] == 'E' ) break;
    sscanf(buff," %f %f %f %f %f %f ",&musteri.id[i],&musteri.x1[i],&musteri.x2[i],
    ...
  15. Replies
    15
    Views
    291

    Well the multiply defined things are because your...

    Well the multiply defined things are because your wrath-utils.h should really be called wrath-utils.c, because it contains actual code.

    #including definitions only works if you include it once in...
  16. Replies
    15
    Views
    291

    Fix looks good. Try it and see what happens. ...

    Fix looks good.
    Try it and see what happens.

    > //#include "wrath-utils.h"
    Was probably not necessary to do this.
  17. Replies
    15
    Views
    291

    You definitely need to find out where safe_malloc...

    You definitely need to find out where safe_malloc is prototyped, and include the appropriate header.

    Your machine has 64-bit addresses.
    Without a prototype, C thinks safe_malloc returns int -...
  18. Replies
    5
    Views
    188

    Like I said in your previous thread. Fix your...

    Like I said in your previous thread.

    Fix your warnings.


    $ gcc -Wall bar.c
    bar.c: In function ‘main’:
    bar.c:17:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has...
  19. Replies
    8
    Views
    231

    Cross-posted how get the JPG image size?...

    Cross-posted
    how get the JPG image size?
    how read the GIF and JPG image size? - C++ Forum
  20. Also here -> How to configure VS Code for...

    Also here -> How to configure VS Code for building an - C++ Forum
  21. Replies
    1
    Views
    120

    So int main ( ) { int myInt; ...

    So


    int main ( ) {
    int myInt;
    scanf("%d",&myInt);
    }


    would become
  22. Your test should be if (*i > *j) You want to...

    Your test should be
    if (*i > *j)

    You want to compare what the pointers point to, not the pointers themselves.

    > create a static function called ascending2()
    You forgot to make it static, not...
  23. Maybe you should upload an example of this...

    Maybe you should upload an example of this "database.cfc" files so we can see what it is you're trying to parse.
    Because it seems now far from clear that we're talking about any kind of regular text...
  24. Replies
    2
    Views
    135

    > while ((harf=fgetc(d)) != 'E') Well this eats...

    > while ((harf=fgetc(d)) != 'E')
    Well this eats the first character of the 1st line, just ruining your attempt to scanf the rest of the line.

    Normally I would suggest


    char buff[BUFSIZ];...
  25. +1 for laserlight for spotting the pointer issue...

    +1 for laserlight for spotting the pointer issue

    @ArakelTheDragon, compile with many warnings enabled and make sure you FIX all of them before running the code.


    $ gcc -c -Wall -Wextra bar.c...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4