Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.21 seconds.

  1. Replies
    7
    Views
    138

    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...
  2. Replies
    7
    Views
    138

    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"
  3. Replies
    2
    Views
    134

    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],
    ...
  4. Replies
    15
    Views
    264

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

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

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

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

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

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

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

    So


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


    would become
  11. 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...
  12. 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...
  13. Replies
    2
    Views
    119

    > 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];...
  14. +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...
  15. Replies
    9
    Views
    262

    Consider different revenue alternatives....

    Consider different revenue alternatives.
    Software as a service - Wikipedia
  16. Replies
    9
    Views
    262

    Presumably the OP is trying to emulate 1980's...

    Presumably the OP is trying to emulate 1980's software 'protection' by locking the installation of the software to the hard disk it was installed on.

    This is a stupid idea for several reasons.
    1....
  17. > Process returned -1073741819 (0xC0000005) ...

    > Process returned -1073741819 (0xC0000005) execution time : 6.915 s
    Yes, your badly constructed double while loop failed to spot the end of file correctly, so it spent the next 5 to 10 seconds...
  18. strstr() finds one string inside another.

    strstr() finds one string inside another.
  19. Replies
    4
    Views
    170

    Well for one thing, it's sure to depend on your...

    Well for one thing, it's sure to depend on your OS of the moment.

    For another thing, the amount of memory you could theoretically allocate at any given moment is likely to be a fluid number that...
  20. Thread: cron and c.out

    by Salem
    Replies
    19
    Views
    381

    When you fill your posts with complaints and...

    When you fill your posts with complaints and heresay, what did you expect.

    Posting evidence of what you actually did is better if you want people to give you actionable things to try. "I tried...
  21. Thread: cron and c.out

    by Salem
    Replies
    19
    Views
    381

    crontab(5): tables for driving cron - Linux man...

    crontab(5): tables for driving cron - Linux man page
    You can see plenty of examples which show more complicated files that what you're claiming.

    Post your actual crontab file (the output of...
  22. Replies
    13
    Views
    234

    Are you even reading the manual page? If it's...

    Are you even reading the manual page?

    If it's a single pid, then the wait() system calls are useless for you.

    Again, explain why you're not using pthread_create et al to do this for you. It's...
  23. Replies
    13
    Views
    234

    Please explain why you desperately need...

    Please explain why you desperately need CLONE_PARENT in your flags?


    All this does is give two things the same pid, such that it becomes impossible to use any of the wait() system calls for one...
  24. Replies
    13
    Views
    234

    Well this works as I would expect. But then...

    Well this works as I would expect.
    But then again, it sets all the flags to 0.


    #define _GNU_SOURCE
    #include <sched.h>

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
  25. Replies
    13
    Views
    234

    OK, couple of things in testing. 1. 1024 bytes...

    OK, couple of things in testing.

    1. 1024 bytes is nowhere near enough for a stack. Try it with 1MB

    2. It seems wait() isn't all that it should be - maybe it's one of the many clone flags you...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4