Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.19 seconds.

  1. Replies
    7
    Views
    153

    Is data_print really an ISR capable of only...

    Is data_print really an ISR capable of only printing one character at a time to some external device?
  2. Replies
    7
    Views
    153

    Well no, you can't assign the contents of what a...

    Well no, you can't assign the contents of what a pointer points to to an array.

    That's why we have functions like strcpy.

    You should find a way of solving your question without so many messy...
  3. Replies
    5
    Views
    199

    > Does anyone know the calculation to do that? ...

    > Does anyone know the calculation to do that?
    Pencil, paper - and a bit of geometry.

    > I can calculate how to center a window on the desktop screen.
    Try doing the same, but introduce a left=0...
  4. Replies
    4
    Views
    113

    > float red2 = image[i][j + 1].rgbtRed; All...

    > float red2 = image[i][j + 1].rgbtRed;
    All these +1 and +2 are going to overflow your array bounds at the limits of your loops.



    float red = 0;
    float green = 0;
    float blue = 0;
    for ( int x...
  5. Replies
    2
    Views
    214

    Scroll down to the "Show threads from the..."...

    Scroll down to the "Show threads from the..." drop-down box.
  6. Replies
    13
    Views
    300

    > return (*(int *)ap > *(int *)bp) - ( *(int *)ap...

    > return (*(int *)ap > *(int *)bp) - ( *(int *)ap < *(int *)bp );
    Unnecessarily terse, and contains a bug.
    Try again.
  7. Replies
    13
    Views
    300

    > printf("%d", list[j]); Move it into the i...

    > printf("%d", list[j]);
    Move it into the i loop, and print subscript i instead.

    Also, you don't need an array of temp, just one.
  8. Replies
    13
    Views
    300

    You're not swapping anything at line 17. Swaps...

    You're not swapping anything at line 17.

    Swaps typically take 3 lines of code.
  9. Replies
    3
    Views
    141

    Have you tried pressing 9 and then enter?

    Have you tried pressing 9 and then enter?
  10. Replies
    6
    Views
    348

    So instead of learning how to solve a problem,...

    So instead of learning how to solve a problem, the OP has learnt that eventually, some schmuck will do their work for them.
  11. Replies
    12
    Views
    347

    > width = bmih.biWidth; if (width%4 != 0) width...

    > width = bmih.biWidth; if (width%4 != 0) width += (4-width%4);
    This is wrong.

    If you have a width of 9 pixels, and 3 bytes per pixel, you have 27 bytes of pixel data per row.

    It is the...
  12. Replies
    3
    Views
    182

    > In order to run this program, the following is...

    > In order to run this program, the following is done
    > ./justify <quote
    TBH, I would add a second option to justify, namely to open the file supplied as a command line argument.

    As in...
  13. Thread: Prime Factor

    by Salem
    Replies
    3
    Views
    140

    Cross-posted here -> Prime Factor - C And C++ |...

    Cross-posted here -> Prime Factor - C And C++ | Dream.In.Code
  14. Replies
    6
    Views
    348

    You start by breaking the problem down into...

    You start by breaking the problem down into simpler problems.

    Like for example, by trying to draw a cross and then an empty diamond


    ....0.....
    ....0.....
    ....0.....
    ....0.....
    000000000.
  15. Replies
    35
    Views
    510

    > adds another point of entry via symlnk or...

    > adds another point of entry via symlnk or whatever it was for malicious software, the fewer points the better
    This is just BS and FUD.

    What you describe only works for dynamic link libraries,...
  16. Replies
    12
    Views
    347

    > unsigned char ee_image[2048][2048]; Another...

    > unsigned char ee_image[2048][2048];
    Another thing to watch out for is your stack usage.

    Your familiar OS usually restricts stack usage to between 1MB and 8MB.
    You just burned 4MB in a single...
  17. Like this? OK, so when I change the 6 to 16...

    Like this?


    OK, so when I change the 6 to 16 in this
    > m.second = str.substr(index, 16);

    I get


    $ g++ -std=c++11 foo.cpp
  18. When you delete the last record, you also need to...

    When you delete the last record, you also need to do
    current->record_list = NULL;
  19. Well at the moment, add_record doesn't add/remove...

    Well at the moment, add_record doesn't add/remove any of the nodes within the keylist.
    Adding a record to one of the nodes doesn't change the overall arrangement of nodes, so there is no need to...
  20. Replies
    14
    Views
    413

    Maybe make clean also a phony target.

    Maybe make clean also a phony target.
  21. Replies
    14
    Views
    413

    > cc -fPIE -shared -Wall -Wextra -o alu_bit.o...

    > cc -fPIE -shared -Wall -Wextra -o alu_bit.o alu_bit.c
    All your .c.o rules need to pass the -c command line option to cc.

    You compile (only) all the .c files into .o files in the first instance....
  22. Replies
    6
    Views
    499

    You need to study how printf and scanf work. ...

    You need to study how printf and scanf work.


    $ gcc -Wall foo.c
    foo.c: In function ‘initStructs’:
    foo.c:47:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type...
  23. Maybe say which variant you mean. std::cout...

    Maybe say which variant you mean.


    std::cout << "Content of var is: " + std::to_string(std::get<int>(var));
  24. c++ - How to enable C++17 compiling in Visual...

    c++ - How to enable C++17 compiling in Visual Studio? - Stack Overflow

    Or
    g++ -std=c++17 prog.cpp
  25. Lookup the strstr() function.

    Lookup the strstr() function.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4