Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.23 seconds.

  1. > pthread_create(&race->runners[i], NULL,...

    > pthread_create(&race->runners[i], NULL, goRunner(RunnerType*), " ");
    You don't specify the type.

    pthread_create(&race->runners[i], NULL, goRunner, " ");
  2. Thread: help with code!

    by Salem
    Replies
    4
    Views
    53

    Same as before. Help w/ my code...

    Same as before.
    Help w/ my code
  3. Question 20.15c...

    Question 20.15c

    Use a temporary variable in your code.
    It's a lot clearer to basically anybody what your intention is.
  4. Replies
    5
    Views
    116

    Stop using scanf_s until you've read the manual....

    Stop using scanf_s until you've read the manual.
    scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l | Microsoft Docs

    You have to pass additional parameters.
    It's not a simple matter of just putting _s...
  5. Replies
    5
    Views
    116

    There is no such thing as extending an array....

    There is no such thing as extending an array.
    Either you have an array (of fixed size), or you have dynamically allocated memory.

    You do have to be careful with your use of & in scanf calls...
  6. Replies
    1
    Views
    83

    Something like this is simple enough for...

    Something like this is simple enough for homework.


    int getNextId(void) {
    static int id = 0;
    return id++;
    }

    Being declared static, the id variable will remember the last value it had...
  7. You're going to be explaining your metaphores...

    You're going to be explaining your metaphores more often than you'll be explaining the real concepts to begin with.
  8. Thread: Help w/ my code

    by Salem
    Replies
    3
    Views
    194

    Some initial observations. 1. main must be...

    Some initial observations.
    1. main must be specified as returning an int.
    Implicit return types became obsolete in 1989 with the first C standard.

    2. Never EVER use gets()
    gets, gets_s -...
  9. Replies
    7
    Views
    149

    Well it might compile, but you need to compile...

    Well it might compile, but you need to compile this 'C' code using a C++ compiler.
    So I made your 'const int' a #define instead.


    $ g++ -D_GNU_SOURCE -Wall main.c
    $ gcc -D_GNU_SOURCE -Wall...
  10. Replies
    7
    Views
    149

    Your code doesn't compile.

    Your code doesn't compile.
  11. Replies
    7
    Views
    149

    > where is my mistake? How do we know what you...

    > where is my mistake?
    How do we know what you were expecting?

    You shouldn't be calling printf in signal handlers.
    signal-safety(7) - Linux manual page
  12. Replies
    4
    Views
    138

    Consider breaking out part of the calculation, so...

    Consider breaking out part of the calculation, so you can separately verify it.


    #include <stdio.h>
    #include <math.h>
    int main(void)
    {
    int year;
    double cobalt_initial;
    printf("Please...
  13. Replies
    2
    Views
    160

    Cross-posted here -> return value in a C function...

    Cross-posted here -> return value in a C function - C++ Forum
  14. Reminds me of Turtle graphics - Wikipedia...

    Reminds me of
    Turtle graphics - Wikipedia
    Logo (programming language) - Wikipedia
  15. > I have never done anything like that (beginner...

    > I have never done anything like that (beginner to C programming)
    But you're an experienced programmer in some other language - right?
  16. Is this some kind of toy for young children?

    Is this some kind of toy for young children?
  17. Replies
    3
    Views
    149

    Bored waiting for a build.... #include...

    Bored waiting for a build....


    #include <stdio.h>

    struct store {
    int Orange;
    int Apple;
    int Pear;
    };
  18. The cast won't help if the underflow has already...

    The cast won't help if the underflow has already happened.
  19. Replies
    3
    Views
    149

    Pretty awful. - global variables -...

    Pretty awful.
    - global variables
    - checkChoice() and mainMenu() in a mutually recursive death spiral.
  20. Replies
    8
    Views
    304

    Simples! qs = z; do { qs = dsum(qs); }...

    Simples!


    qs = z;
    do {
    qs = dsum(qs);
    } while ( qs >= 10 );
  21. Replies
    6
    Views
    191

    Because &RXData is a pointer to the whole array,...

    Because &RXData is a pointer to the whole array, whereas RXData and &RXData[0] are pointers to the first element of the array.

    Write char (*rxMssg)[20] = &RXData;
    if you want to point to the...
  22. Replies
    8
    Views
    304

    What's your question? Your code gives the right...

    What's your question?
    Your code gives the right answer.
  23. Replies
    2
    Views
    173

    Despite the name, kill doesn't kill a process per...

    Despite the name, kill doesn't kill a process per se.
    Whether a process actually dies depends on the nature of
    a) the signal being sent.
    b) what signal handling the recipient task has installed.
    ...
  24. Replies
    10
    Views
    266

    Like I said, you can prove you're the original...

    Like I said, you can prove you're the original poster - so what's to worry about?

    Unless your assignment is meant to be closed book and seeing help online is not allowed.

    Raise your concerns...
  25. Replies
    10
    Views
    266

    > I can't post my code here to avoid plagiarism...

    > I can't post my code here to avoid plagiarism
    Well you're pretty much stuffed then.

    If you're worried that others will steal your work, you have the benefit of being able to show "mine is...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4