Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.34 seconds.

  1. Thread: mfc c++

    by Salem
    Replies
    3
    Views
    93

    Your picture doesn't work, and you obviously mean...

    Your picture doesn't work, and you obviously mean something else than "recover".
  2. Replies
    2
    Views
    34

    So how does this differ from std::vector or...

    So how does this differ from std::vector or std::array ?

    I see your readme has "If you wanna use type std::string it won't work , so instead use char*"
    Does that go for anything else which isn't...
  3. Thread: Pointers stuff

    by Salem
    Replies
    4
    Views
    124

    Yes, moved.

    Yes, moved.
  4. Thread: Pointers stuff

    by Salem
    Replies
    4
    Views
    124

    There are two (or 3) things wrong with your rev...

    There are two (or 3) things wrong with your rev function.
    1. Your local reverse array is too short (there is no room for a \0)
    2. Your local array goes out of scope when you return. You don't...
  5. So what's == if it's not a comparison operator?

    So what's == if it's not a comparison operator?
  6. Thread: mfc c++

    by Salem
    Replies
    3
    Views
    93

    > I have an exe file with Dlg.cpp and h files >...

    > I have an exe file with Dlg.cpp and h files
    > How can i recover visual studio
    If you're hoping to get back your original source code, that isn't going to happen.
  7. Replies
    2
    Views
    83

    No idea what you were searching for, but there's...

    No idea what you were searching for, but there's plenty to be found.

    An introduction to schedulers:Co-operative and pre-emptive scheduling ~ 8051 microcontrollers
    7 steps to writing a simple...
  8. Runaway recursion perhaps? #0 ...

    Runaway recursion perhaps?


    #0 0x000000000040077a in lcp (str=<error reading variable: Cannot access memory at address 0x7fffff7fef38>,
    l=<error reading variable: Cannot access memory at...
  9. That's not how getline works. getline(3):...

    That's not how getline works.
    getline(3): delimited string input - Linux man page

    You just keep calling it in a loop, and if there is a longer line somewhere in the input, getline will realloc as...
  10. There is only one address returned by malloc, but...

    There is only one address returned by malloc, but it is the start address of however many bytes you asked for, as given by your sizeof() expression.

    This is the same thing without the malloc.

    ...
  11. Replies
    2
    Views
    94

    L will be promoted to double for that part of the...

    L will be promoted to double for that part of the calculation, which will result in the whole right hand side being promoted to double for evaluation.
    The assignment will then truncate the whole...
  12. Replies
    16
    Views
    315

    Seems like one of those pointless exercises like...

    Seems like one of those pointless exercises like add two numbers without using +

    It seems the OP is lumbered with a tutor who thinks magic tricks is how you teach programming.
  13. Replies
    10
    Views
    245

    > for comparison reasons we were given an...

    > for comparison reasons we were given an executable file that holds an efficient code (we can't see the code).
    > we are supposed to try and make an even more efficient program.
    How do you compare...
  14. Replies
    16
    Views
    315

    > while (power--) // loops 28 times - CPU...

    > while (power--) // loops 28 times - CPU overloading - too expensive
    So initialise b once, and do one b /= 2 for each loop iteration.

    I've no idea what you're trying to prove here, except how...
  15. Replies
    10
    Views
    245

    That's a why, not a what. If you want more...

    That's a why, not a what.

    If you want more specific help, post the text of the challenge question.
  16. Replies
    16
    Views
    315

    That's no different to what you started with....

    That's no different to what you started with.
    printf("Exponent = %d\n", ((binary >> 23) & 255) - 127);
  17. Replies
    10
    Views
    245

    What are you trying to show?

    What are you trying to show?
  18. Replies
    16
    Views
    315

    Bit-fields or maths. #include ...

    Bit-fields or maths.


    #include <stdio.h>
    #include <math.h>
    int main ( ) {
    union {
    float x;
    struct {
    // assumes bit fields are arranged LSB first
  19. Replies
    10
    Views
    245

    > for (int i = 5; i

    > for (int i = 5; i <= sqrt(num); i = i + 6)
    Precalculate the square root, you're doing this every time around the loop.

    > for (int i = 0; i < run_n / NUM_THREADS; ++i)
    Not sure why you're not...
  20. Replies
    3
    Views
    152

    https://faq.cprogramming.com/cgi-bin/smartfaq.cgi?...

    https://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044844545&id=1043284392

    If you want to do more than just print text (using cout), then you'll need
    Console Functions - Windows Console |...
  21. Replies
    1
    Views
    137

    Your comments document the language, not what...

    Your comments document the language, not what your program does.
    Although having said that, some tutors seem to like that kind of stuff.

    The only semi-useful comment would be the one "/* These...
  22. Replies
    26
    Views
    550

    > qsort( maps->buff, maps->size, sizeof(struct...

    > qsort( maps->buff, maps->size, sizeof(struct paw_map), paw_compare_maps );
    Your size should be the number of elements, not the number of bytes.
  23. Replies
    2
    Views
    248

    What sort of problems are you having? (we don't...

    What sort of problems are you having? (we don't know, you didn't post code).

    How far have you got?
    - open and close the file
    - read one word from the file and print it using printf
    - read all...
  24. Replies
    26
    Views
    550

    So how does that differ from all the other public...

    So how does that differ from all the other public functions in your other source files?

    Does 'nm ./lib/libpaw.so' tell you anything about what symbols are present?
  25. If you want to know what happened on a per file...

    If you want to know what happened on a per file basis, just type
    git log path/to/file
    It will tell you just those commits which affected that file.

    Similarly for some sub-directory, like the one...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4