Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    1
    Views
    60

    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.
  2. Thread: typedef struct

    by Salem
    Replies
    6
    Views
    81

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

    What's to explain?

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

    by Salem
    Replies
    6
    Views
    81

    No..

    No..
  4. 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.
  5. Thread: typedef struct

    by Salem
    Replies
    6
    Views
    81

    Yes.

    Yes.
  6. Replies
    7
    Views
    133

    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.
  7. Replies
    3
    Views
    137

    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...
  8. Replies
    7
    Views
    177

    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 ) )

    ...
  9. Replies
    7
    Views
    133

    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...
  10. Replies
    3
    Views
    137

    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...
  11. Replies
    7
    Views
    151

    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...
  12. Replies
    7
    Views
    151

    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"
  13. Replies
    2
    Views
    155

    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],
    ...
  14. Replies
    15
    Views
    285

    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...
  15. Replies
    15
    Views
    285

    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.
  16. Replies
    15
    Views
    285

    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 -...
  17. Replies
    5
    Views
    183

    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...
  18. Replies
    8
    Views
    228

    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
  19. Also here -> How to configure VS Code for...

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

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

    So


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


    would become
  21. 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...
  22. 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...
  23. Replies
    2
    Views
    132

    > 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];...
  24. +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...
  25. Replies
    9
    Views
    298

    Consider different revenue alternatives....

    Consider different revenue alternatives.
    Software as a service - Wikipedia
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4