Search:

Type: Posts; User: flp1969

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: hex increment

    by flp1969
    Replies
    3
    Views
    78

    Maybe, like this? #include void...

    Maybe, like this?

    #include <stdio.h>

    void incr( unsigned char * );
    void show( char *, unsigned char * );

    int main( void )
    {
    static unsigned char keys[16] = { [13] = 0x30, 0x30, 0xff };
  2. There are ways to execute functions other than...

    Yes, always. Main is the entry point into your program. Everything starts there.[/QUOTE]
    There are ways to execute functions other than main() beforehand, but this depends on your compiler and it...
  3. Thread: Slow forum?

    by flp1969
    Replies
    11
    Views
    485

    Here, in my country, mega.nz was blacklisted in...

    Here, in my country, mega.nz was blacklisted in most telephone operators... To my surprise, Cloudflare isn't resolving the name as well... So, I change my DNS to Google...

    Well... after that, this...
  4. Replies
    3
    Views
    99

    Also, there is this good book: Hacker's Delight...

    Also, there is this good book: Hacker's Delight
    You can download here
  5. Replies
    2
    Views
    115

    Console or Window Client Area? For Console,...

    Console or Window Client Area?

    For Console, check for Win32 Console API: here
  6. Replies
    4
    Views
    125

    5 things here: 1- If you are using libc...

    5 things here:

    1- If you are using libc (sprintf function), why do you choose to write to stdout using write?
    2- In your second program,the array is 100 bytes long, but you are trying to access...
  7. #include static char tbl[] = { 28,...

    #include <stdio.h>

    static char tbl[] = {
    28, ' ', 4, 'o', 12, '$', 4, 'o', 1, '\n', 24, ' ', 2, 'o', 24, '$', 1, 'o',
    1, '\n', 21, ' ', 2, 'o', 30, '$', 1, 'o', 9, ' ', 1, 'o', 1, '$', 3, ' ',...
  8. But you asked how to use 2?!

    But you asked how to use 2?!
  9. You are using 4 characters: ' ', '+', '-' and '|'.

    You are using 4 characters: ' ', '+', '-' and '|'.
  10. Replies
    5
    Views
    188

    Please, stop using system() in your code... 1....

    Please, stop using system() in your code...

    1. "cls" is available in Windows/DOS only;
    2. it isn't safe... What if you have an "CLS.COM or CLS.EXE" in your PATH?
    3. It is SLOW!

    Here's a...
  11. Replies
    5
    Views
    188

    Urgent?! Who's dying?

    Urgent?! Who's dying?
  12. Replies
    14
    Views
    326

    You got it all wrong...

    You got it all wrong...
  13. Replies
    14
    Views
    326

    Another thing... If you toss a D6 dice, let's...

    Another thing... If you toss a D6 dice, let's say, 20 times, you CAN get the same number in a "long" sequence... For the sake of argument, imagine tossing the dice and getting 3, four times, one...
  14. Replies
    5
    Views
    257

    A button is a child Window, created with...

    A button is a child Window, created with CreateWindowEx() with hWndParent argument set to the handle of your main window. You'll need to process the WM_CREATE, to create them and WM_COMMAND to do...
  15. Replies
    46
    Views
    1,297

    Why make such a complex makefile? You only need...

    Why make such a complex makefile? You only need this:

    # Define EXE_EXT and OBJ_EXT below if you are working with Windows
    #EXE_EXT=.exe
    #OBJ_EXT=obj

    # These are for Linux and UNIX alike...
  16. Replies
    5
    Views
    123

    Is it necessary to implement via loop? You could...

    Is it necessary to implement via loop? You could do this:

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

    static char *readstring( char *, char ** );

    int main( void )
    {
  17. Replies
    23
    Views
    363

    My point was that the question isn't clear enough...

    My point was that the question isn't clear enough about this, since "corner" is a generic term, instead of "vertice". Put point C close to one of the oposite vertices and it is "at the corner", as in...
  18. Replies
    23
    Views
    363

    Interesting... I never thought about rectangles...

    Interesting... I never thought about rectangles to have 4 "corners"/vertices and with perpendicular edges/sides... this is so new to me!

    By your criteria, the maximum number of rectangles when you...
  19. Replies
    23
    Views
    363

    WoW! Really... don't tell me, it has 4 sides as...

    WoW! Really... don't tell me, it has 4 sides as well?

    [
    Not really... by "corner" you mean the rectangle vertices or its sides? These vertices must be opposing or they can be at the same "side"?...
  20. Thread: Slow forum?

    by flp1969
    Replies
    11
    Views
    485

    Hummmm... So, that's why I got problems loading...

    Hummmm... So, that's why I got problems loading pages here? (most of the time I got a timeout response!)...
  21. Replies
    23
    Views
    363

    I would criticize this approach not because of...

    I would criticize this approach not because of the code, but because lacks the rigorous definition of what would constitute a rectangle based on the points diven... With 3 points you can draw, at...
  22. Thread: File problem

    by flp1969
    Replies
    26
    Views
    327

    It is printed because you tell the compiler to...

    It is printed because you tell the compiler to print a 2 newlines each time lineNo[counter+1] == 1.

    See: man fgets and man puts
  23. Thread: Printf buffer

    by flp1969
    Replies
    2
    Views
    85

    As @laserlight says: undefined behavior. Tip:...

    As @laserlight says: undefined behavior.

    Tip: If you are using glibc and want to use only one argument, you can do, for example:

    printf( "%1$d -> 0x%1$02x", 3 );
    Will print:

    3 -> 0x03
  24. Thread: Reading UTF

    by flp1969
    Replies
    2
    Views
    94

    Maybe because there is no 0x80 in UTF-8: UTF-8...

    Maybe because there is no 0x80 in UTF-8:

    UTF-8 encoding (U+N -> encoding):


    0x00000000 - 0x0000007F: 0xxxxxxx
    0x00000080 - 0x000007FF: 110xxxxx 10xxxxxx
    0x00000800 - 0x0000FFFF: 1110xxxx...
  25. I disagree... take a look at functions of libc......

    I disagree... take a look at functions of libc... Almost none checks for anomalous inputs (strlen, strcpy, strcat, printf, scanf, ...). If you check everything in each function you make, then your...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4