Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.11 seconds.

  1. What about it? You should be able to string...

    What about it?

    You should be able to string together .c, .s, .o and .a files on the command line to gcc, and it will pass the relevant files onto the appropriate compilation step.
  2. Thread: f-write stdout

    by Salem
    Replies
    6
    Views
    116

    Yes, you use fprintf() instead. Or you sprintf...

    Yes, you use fprintf() instead.

    Or you sprintf it to a string, then fwrite the string.
  3. Replies
    2
    Views
    81

    /STACK (Stack Allocations) | Microsoft Docs...

    /STACK (Stack Allocations) | Microsoft Docs
  4. The assembler is going to read input from a file,...

    The assembler is going to read input from a file, or from stdin.

    So either
    - write your string to a temporary file, then invoke the assembler with your temp file as a command line parameter.
    -...
  5. Why all the omp, when you then go and slug the...

    Why all the omp, when you then go and slug the system by filling it with sleep() ?

    > The server codewars allow for 12 s time running code.
    Is that wall clock time (which sleep() will influence),...
  6. Replies
    4
    Views
    144

    You need to understand that realloc can move the...

    You need to understand that realloc can move the memory.

    So push_int needs some way to convey that back to main.

    A simple way is to do
    array = push_int(array, &counter, &size, &number);
    ...
  7. Same answer "bro". Make an effort, show where...

    Same answer "bro".
    Make an effort, show where you can get to by your own effort and then we'll help you.

    We're your guide, not your mule.
  8. It's right there on the very web page you just...

    It's right there on the very web page you just pointed us to!.
  9. First of all, we don't just "give code" in...

    First of all, we don't just "give code" in response to people just dumping their assignment on the board.

    If you really want to learn, you need to make an effort to understand some aspect of the...
  10. Replies
    1
    Views
    162

    How have you implemented your stacks to begin...

    How have you implemented your stacks to begin with?
  11. Replies
    1
    Views
    142

    Hard to say where you messed up, when you've...

    Hard to say where you messed up, when you've deleted your code.

    But here's a sequence of exercises.


    int array[5] = { 4, 1, 8, 3, 9 };
    qsort( array, 5, sizeof(array[0]), compare_fn);

    ...
  12. Replies
    16
    Views
    466

    > printf("%d\n", isNumber(".")); Also returns...

    > printf("%d\n", isNumber("."));
    Also returns 1.
  13. Replies
    1
    Views
    188

    Post your code as text, not a broken picture. ...

    Post your code as text, not a broken picture.

    Nevermind, cross-posted here as well.
    Calculate Discount c++ - C++ Forum
  14. Replies
    16
    Views
    466

    That would also return true if you typed in a...

    That would also return true if you typed in a numeric IP address.
  15. Replies
    2
    Views
    171

    The memcpy is the only way to go.

    The memcpy is the only way to go.
  16. Replies
    12
    Views
    369

    1. You need lots of braces. C isn't Python. ...

    1. You need lots of braces. C isn't Python. Just because you indented it nicely doesn't make C follow a different path through the code.

    2. Use == in place of =, if you want to compare two...
  17. > (curr->record.arg1 == record->arg1)...

    > (curr->record.arg1 == record->arg1) && \
    1. You don't need the \ at the end of these lines. You only need \ at the end of complicated #define code blocks.
    2. Make it a separate...
  18. Replies
    3
    Views
    261

    > mylib.h is the header that contains a prototype...

    > mylib.h is the header that contains a prototype for every function.
    Then your test.c should have
    #include "mylib.h"
    not
    #include "lib_string.h"
  19. Replies
    3
    Views
    235

    Well if you're on Linux/Unix, you can do this. ...

    Well if you're on Linux/Unix, you can do this.


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

    int main()
    {
    char *p = NULL;
    printf("trouble ahead\n");
  20. Replies
    4
    Views
    368

    You should use the strtol(), strtoul() or...

    You should use the strtol(), strtoul() or strtod() functions for your string-to-number conversions.
  21. Study the add functions in more detail,...

    Study the add functions in more detail, especially why it's not necessary to return anything with this revised list structure.

    > (curr->record.arg1 == record->arg1) & \
    > ...
  22. Replies
    23
    Views
    1,098

    For future reference, please use "copy as text"...

    For future reference, please use "copy as text" in your code editor, and/or "paste as text" in your browser.
    The colour/font ridden mess isn't sustainable.

    circumference = diameter * pie;
    ...
  23. Replies
    23
    Views
    1,098

    Make it like this. // Enter the value...

    Make it like this.



    // Enter the value of Radius for calculation of above.
    printf("Please enter the value of circle radius \n");
    scanf("%f", &radius);

    // These are the lines that...
  24. Replies
    23
    Views
    1,098

    > diameter = radius * 2; Move all your...

    > diameter = radius * 2;
    Move all your calculations...

    > scanf("%f", &radius);
    AFTER you have read the input data for those calculations.
  25. Replies
    1
    Views
    354

    childfd = accept(parentfd, (struct sockaddr *)...

    childfd = accept(parentfd, (struct sockaddr *) &clientaddr, &addr_size);
    ...
    if (pthread_create(&tid[i++], NULL, socketThread, &childfd) != 0)

    This is probably why you're getting lots of...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4