Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.17 seconds.

  1. Replies
    4
    Views
    76

    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);
    ...
  2. 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.
  3. 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!.
  4. 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...
  5. Replies
    1
    Views
    139

    How have you implemented your stacks to begin...

    How have you implemented your stacks to begin with?
  6. Replies
    1
    Views
    114

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

    ...
  7. Replies
    16
    Views
    412

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

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

    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
  9. Replies
    16
    Views
    412

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

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

    The memcpy is the only way to go.

    The memcpy is the only way to go.
  11. Replies
    12
    Views
    339

    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...
  12. > (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...
  13. Replies
    3
    Views
    238

    > 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"
  14. Replies
    3
    Views
    201

    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");
  15. Replies
    2
    Views
    264

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

    You should use the strtol(), strtoul() or strtod() functions for your string-to-number conversions.
  16. 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) & \
    > ...
  17. Replies
    23
    Views
    1,065

    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;
    ...
  18. Replies
    23
    Views
    1,065

    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...
  19. Replies
    23
    Views
    1,065

    > 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.
  20. Replies
    1
    Views
    342

    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...
  21. Replies
    1
    Views
    296

    1. You don't initialise your tie variable. 2....

    1. You don't initialise your tie variable.
    2. Your function lacks a return statement.
    3. In main, you don't call the function (but you do create a variable with the same name as your function).
  22. Try this. #include #include...

    Try this.


    #include <limits.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>
    #include <unistd.h> // sleep
    #include <pthread.h>
  23. Replies
    3
    Views
    554

    > The two machines under my desk are fitted with...

    > The two machines under my desk are fitted with ASUS HS7850 graphics cards
    Are they otherwise identical (same motherboard, OS) ?

    If so, you could physically swap the cards between the machines...
  24. Replies
    7
    Views
    425

    Normally, I would put all that in a separate text...

    Normally, I would put all that in a separate text file.

    If you have many messages, you could structure it in some way.


    <messages>
    <message id="1" lang="en">Hello</message>
    <message...
  25. Somewhere between this...

    Somewhere between this
    https://www.en24news.com/2020/08/classic-game-snake-executable-from-qr-code.html
    and this
    Beware the square: how to spot malicious QR codes – Sophos News

    Your eventBuffer...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4