Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.21 seconds; generated 56 minute(s) ago.

  1. Your markup is unacceptable. It's an unreadable...

    Your markup is unacceptable.
    It's an unreadable mess.

    Edit your post (or just reply and I'll fix it), and this time use "copy as text" in your IDE and/or "paste as text" in your browser.
  2. Replies
    1
    Views
    87

    Are you ever going to learn how to post code...

    Are you ever going to learn how to post code without all that markup?

    Are you going to stop pushing your spam urls?
  3. Why do you need to do it without a library? ...

    Why do you need to do it without a library?

    sourceware.org Git - glibc.git/summary
    It'll be buried somewhere in there.

    But be warned, float to string conversion is a messy business at the best...
  4. Replies
    1
    Views
    123

    Looks good.

    Looks good.
  5. There are a multitude of reasons why. 1. Your...

    There are a multitude of reasons why.

    1. Your program is a userland process, so all your clocks are to some extent an approximation.

    2. calling malloc may involve a very expensive trap into the...
  6. So can you post your valgrind log output? Can...

    So can you post your valgrind log output?

    Can you control the options you give to valgrind?
  7. The comma operator doesn't do what you think it...

    The comma operator doesn't do what you think it does.

    while(PW!=ps, i<3)
    is just
    while( i<3)
    which is why "No matter if the password is 'right' it will only pass through on the third attempt."...
  8. Replies
    5
    Views
    314

    Both these do the same thing, but one uses an...

    Both these do the same thing, but one uses an extra level of indirection (a star), whereas the other returns a result.


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

    struct Node {
    int data;
    ...
  9. Replies
    5
    Views
    314

    In the same way when you pass a pointer to an...

    In the same way when you pass a pointer to an int, you want to change the int


    void foo ( int *p ) {
    *p = 42;
    }


    You might want to change the pointer in this context.
  10. Replies
    1
    Views
    207

    You want to be doing something like...

    You want to be doing something like
    strcmp(current->data,current->nextNode->data)

    Then doing a string swap using strcpy.


    As an aside, you really need to start making some functions out of...
  11. Replies
    8
    Views
    379

    Which OS are you on? It's typically ctrl-z for...

    Which OS are you on?

    It's typically ctrl-z for DOS/Windows and ctrl-d for Linux/Unix.

    When do you signal EOF?

    hello<ctrl-z>
    is not the same as
    hello
    <ctrl-z>
  12. Thread: Beginner

    by Salem
    Replies
    5
    Views
    387

    Sure, Visual Studio Express is also a good choice.

    Sure, Visual Studio Express is also a good choice.
  13. Replies
    3
    Views
    201

    GetCurrentThread function (processthreadsapi.h) -...

    GetCurrentThread function (processthreadsapi.h) - Win32 apps | Microsoft Docs
  14. Thread: Beginner

    by Salem
    Replies
    5
    Views
    387

    I'm not sure I'd recommend an IDE that's 3 years...

    I'm not sure I'd recommend an IDE that's 3 years old, costs money after a trial period, from a site with spelling mistakes, and it doesn't even come with a compiler!

    Binary releases - Code::Blocks...
  15. Replies
    1
    Views
    184

    switch / case work well when - one side of your...

    switch / case work well when
    - one side of your if expressions are constants
    - those constants are close together.

    But your if's are variable on both sides, and the range is 1 to 372 (31*12)
    ...
  16. Well there's your problem! Expecting...

    Well there's your problem!
    Expecting "performance" out of a bubble sort.

    std::sort - cppreference.com
  17. What sort of programs do you intend to write. ...

    What sort of programs do you intend to write.

    Regular user-space programs or kernel/driver hacking?
    If you're messing with the kernel at all, then a cross-compiler might be a better idea.
    You...
  18. Post one of your better attempts, then we can...

    Post one of your better attempts, then we can show you how to fix it.
  19. Replies
    10
    Views
    511

    Maybe you want this then. A simple libpng...

    Maybe you want this then.
    A simple libpng example program

    Just type "libpng example" into your favourite search engine and read a few examples.
  20. Replies
    10
    Views
    479

    > *(stringbuild + strlen(stringbuild))...

    > *(stringbuild + strlen(stringbuild)) = ch;
    > stringbuild = (char *)realloc(stringbuild, strlen(stringbuild));
    1. You don't need to cast the result of malloc / calloc /...
  21. Replies
    10
    Views
    479

    It looks like wherever you copy/pasted this code...

    It looks like wherever you copy/pasted this code from has removed a bunch of critical whitespace from your code.
  22. Replies
    3
    Views
    230

    rpath is how make finds things. At run-time,...

    rpath is how make finds things.

    At run-time, you need to study what these tell you.
    ldd(1) - Linux manual page
    ldconfig(8) - Linux manual page
  23. Replies
    12
    Views
    609

    > I must assign the whole payload to p_data,...

    > I must assign the whole payload to p_data, otherwise just the imu will be transmitted (bluetooth application)
    It's just a pointer!
    hvx_params.p_data = sampling->payload.imu;
    hvx_params.p_data =...
  24. I fail to see how a single "if" can have a...

    I fail to see how a single "if" can have a performance impact compared to "lots of code".

    Is this backed up by some actual profiling data, or just finger in the air guessing.

    > Assume loop is...
  25. Replies
    12
    Views
    609

    > hvx_params.p_data = sampling->payload; Well in...

    > hvx_params.p_data = sampling->payload;
    Well in your code, this would be an error to begin with.
    p_data is a uint8_t*, but payload is an array of int16_t

    But aside from that, you could do...
Results 1 to 25 of 488
Page 1 of 20 1 2 3 4