Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.36 seconds.

  1. You can't modify string literals because they're...

    You can't modify string literals because they're placed in read-only memory.

    You either have to
    - pass another parameter pointing to some memory where you want the modified string placed.
    -...
  2. Replies
    12
    Views
    294

    Well GetBits is a bloated kitchen-sink function...

    Well GetBits is a bloated kitchen-sink function trying to do too much.

    bool backwards, bool left_shifted are needless complications.
  3. Replies
    12
    Views
    294

    1. Make your SeeBits / GetBits functions take...

    1. Make your SeeBits / GetBits functions take const void * - just because.

    2. Put a watchpoint on the variable which is troubling you.
    Debugging – Types Of Data Breakpoints In GDB – mohit.io
  4. Replies
    2
    Views
    123

    > For the moment it only accepts server-name like...

    > For the moment it only accepts server-name like
    You've tried this?

    getaddrinfo function (ws2tcpip.h) - Win32 apps | Microsoft Docs


    Because on the face of it, you can type 'localhost' or...
  5. Thread: Unions...

    by Salem
    Replies
    5
    Views
    194

    Try it with union { float AsFloat; ...

    Try it with


    union
    {
    float AsFloat;
    char AsByte[4];
    } FloatUnion;
  6. Replies
    4
    Views
    166

    Depending on your platform, stdin can also be...

    Depending on your platform, stdin can also be buffered in OS driver layer as well.
  7. Replies
    37
    Views
    654

    s/don't know/lost interest in playing 20...

    s/don't know/lost interest in playing 20 questions with someone capable of only 1 sentence answers/
  8. Replies
    4
    Views
    166

    Which OS/Compiler are you using? How can I get...

    Which OS/Compiler are you using?

    How can I get input without having the user hit [Enter]? - Cprogramming.com
  9. Hardware ownership tends to be a more fundamental...

    Hardware ownership tends to be a more fundamental property of the OS than any particular glossy UI you put in front of the user.

    Try this program.
    Configuring a Communications Resource - Win32...
  10. Replies
    37
    Views
    654

    It's like getting blood out of a stone. How To...

    It's like getting blood out of a stone.
    How To Ask Questions The Smart Way

    There are at least two different IDEs sporting the "dev-c++" label, which one do you have.

    Not to mention whether...
  11. Replies
    37
    Views
    654

    I suppose the next question is which...

    I suppose the next question is which OS/Compiler/IDE/GUI Toolkit you're using.
  12. Replies
    37
    Views
    654

    The garbled mess of an inline image is not...

    The garbled mess of an inline image is not viewable.
  13. Replies
    37
    Views
    654

    I can add PNG files just fine. Just click the...

    I can add PNG files just fine.

    Just click the "Go Advanced" button to manage things like attachments.
    Valid file extensions: bmp c cc cpp cxx doc gif h hpp hxx jpe jpeg jpg pdf png psd txt xls...
  14. Replies
    37
    Views
    654

    Show us a picture of what you mean by "ribbon"...

    Show us a picture of what you mean by "ribbon" and "display area".
  15. Replies
    11
    Views
    201

    That makes no sense. FA? 4D? Your current...

    That makes no sense.
    FA?
    4D?
    Your current random number generator might start off like that, but everyone else sees different things.



    #include <stdio.h>
    #include <stdlib.h>
    #include...
  16. Replies
    11
    Views
    201

    Post a complete code we can copy/paste/run to see...

    Post a complete code we can copy/paste/run to see what you're seeing.
  17. Replies
    8
    Views
    272

    > But shouldn't compiler complain about...

    > But shouldn't compiler complain about redefinition of a typedef?
    Well each is scoped by the braces of the do-while, so no.
  18. Replies
    8
    Views
    272

    Usage - like if ( IS_BIT_SET(255,8) ) { ...

    Usage - like


    if ( IS_BIT_SET(255,8) ) {
    // do something
    }


    Really limits your options as to what is syntactically valid inside your macro.
  19. Replies
    8
    Views
    272

    What examples of use in context do you have?

    What examples of use in context do you have?
  20. Replies
    8
    Views
    272

    How do you expect the compile time pre-processor...

    How do you expect the compile time pre-processor to deal with run-time values?

    If you want to do this, make it an inline function rather than a macro.
  21. The best way is to use the %x format, rather than...

    The best way is to use the %x format, rather than trying to mung something yourself with a separate loop.



    #include <stdio.h>

    int main ( ) {
    for ( int c = 'g' ; c <= 's' ; c++ ) {
    ...
  22. Replies
    15
    Views
    454

    > #ifndef is not working as expected. That...

    > #ifndef is not working as expected.
    That depends on what your expectation was.

    But if you're staring at pre-processor weirdness, gcc -E is your friend (I omitted all of stdio.h for clarity).
    ...
  23. Replies
    2
    Views
    227

    > I am busy with web application security for...

    > I am busy with web application security for years, so I believe that I have a "hacker mindset" to understand the logic behind vulnerable codes and threats.
    But you can't use google?

    I fully...
  24. Replies
    4
    Views
    241

    The normal convention is that libraries go at the...

    The normal convention is that libraries go at the end of the command line.


    gcc -Wall -g -o prog wrapLibraryFunc.c prog.c -L. -lmylib
  25. Optimize Options (Using the GNU Compiler...

    Optimize Options (Using the GNU Compiler Collection (GCC))

    Every time there is some variation in the unseen store/load of your intermediate floating point value, it's an opportunity for creeping...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4