Search:

Type: Posts; User: john.c

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds; generated 58 minute(s) ago.

  1. Replies
    2
    Views
    827

    It would be more usual to call DialogBoxW in...

    It would be more usual to call DialogBoxW in response to a command from the main window, like from a menu item. If you don't want to make a menu item yet, you could just use a left-click of the...
  2. Replies
    3
    Views
    1,352

    I don't see why your code isn't working. You need...

    I don't see why your code isn't working. You need to post a complete example program that demonstrates the problem.


    #include <iostream>
    int main() {
    unsigned width = 1234; // must be <...
  3. Replies
    19
    Views
    1,405

    flp isn't pointing out the typo. You're trying to...

    flp isn't pointing out the typo. You're trying to store a pointer into a non-pointer. Try using single quotes around the character.
  4. Replies
    2
    Views
    360

    It's hard to see exactly what is going on here....

    It's hard to see exactly what is going on here. You've left out the important part that would show what kind of structure is being maintained with these variables.
    Does theRecords point to a linked...
  5. Replies
    2
    Views
    1,370

    That's basically it. The CB_ADDSTRING message...

    That's basically it.

    The CB_ADDSTRING message adds a new combo box entry and returns the index of the new entry.

    The CB_SETITEMDATA message sets a pointer associated with a combo box entry to...
  6. Replies
    2
    Views
    458

    Don't just say "there was an error"! Copy/paste...

    Don't just say "there was an error"! Copy/paste the exact text of the error.

    At any rate, it works for me:


    typedef struct { int x, y, z; } Date;

    int main() {
    Date a0, a1, a2;
    ...
  7. Replies
    3
    Views
    1,160

    It is reinterpreting a pointer to DC_ATTR into a...

    It is reinterpreting a pointer to DC_ATTR into a pointer to void* and then storing an address at that location to make it part of a linked list.


    #include <stdio.h>
    #include <stdlib.h>
    ...
  8. You are completely missing the point. I'm not...

    You are completely missing the point.
    I'm not saying that's the way you should structure your actual program.
    I'm saying that if you want someone to help you then you need to make it as easy as...
  9. Does your new code properly handle: "()" "(())"...

    Does your new code properly handle:
    "()"
    "(())"
    "((()))"
    "(()())"
    "(().())"
    etc.

    How about:
    "((a . b) (c . d))"
  10. Replies
    9
    Views
    1,149

    I think it might have been true in the original...

    I think it might have been true in the original version of C. Also, when a float is passed to a function that accepts a variable number of arguments such as printf, it's converted to a double. That's...
  11. Replies
    9
    Views
    1,149

    That's not true.

    That's not true.
  12. Replies
    9
    Views
    1,149

    There are a lot of different types: integer...

    There are a lot of different types:
    integer (char, short, int, long, long long; signed, unsigned)
    floating point (float, double, long double)
    complex (float, double, long double)
    pointer
    array...
  13. Replies
    11
    Views
    1,005

    ssize_t is not in standard C although it is in...

    ssize_t is not in standard C although it is in the POSIX standard. Strangely, it is only required to be able to represent -1 in addition to positive values.

    <sys/types.h>
  14. Replies
    3
    Views
    312

    You have not left enough room in fpath1 and...

    You have not left enough room in fpath1 and fpath2 to concatenate further characters to the strings. If you leave the brackets blank then the size of the char array is determined by the initializing...
  15. Replies
    7
    Views
    1,055

    The only thing defines add is the textual...

    The only thing defines add is the textual replacement that they do. The defines themselves don't add anything to a C program. They completely disappear after the preprocessing step of compilation.
    ...
  16. Thread: Templates

    by john.c
    Replies
    3
    Views
    1,531

    You could do something like this: auto...

    You could do something like this:


    auto string_len(char const* s) { return strlen(s); }
    auto string_len(wchar_t const* s) { return wcslen(s); }

    template <typename T>
    auto RegexMatchAll(T...
  17. Thread: Templates

    by john.c
    Replies
    3
    Views
    1,531

    The one using basic_string doesn't work because...

    The one using basic_string doesn't work because the iterators in the returned match_result point to a temporary object that is created for the RegexSearch function call.
    You can make it work by...
  18. Replies
    7
    Views
    1,055

    I think you mean something like this: ...

    I think you mean something like this:


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

    #define SIZE 1100

    #define B10 " "
    #define B50 B10 B10 B10 B10 B10
  19. I think you are misinterpreting od's output....

    I think you are misinterpreting od's output. Every 2-byte unit looks "reversed" because your machine is little-endian.
    Try od -Ax -tx1 -N 128 vm09.rom
  20. That isn't a fixed-sized array since n_spheres is...

    That isn't a fixed-sized array since n_spheres is a variable.
    pixel_array is also obviously variable-sized.
    You should be getting warnings about variable-sized arrays being forbidden in standard...
  21. Replies
    2
    Views
    1,576

    MFC is built on top of the Windows API, so...

    MFC is built on top of the Windows API, so anything that can be done with MFC can be done with the underlying API. I suggest using the basic API for now.
  22. Of course it can. There must be some difference...

    Of course it can. There must be some difference that you aren't disclosing. Are you perhaps using a variable-sized array for the Spheres?
  23. Replies
    4
    Views
    1,259

    Another problem is that you say your array is...

    Another problem is that you say your array is declared as xquestions[10][6] and then you say you are accessing xquestions[x][6], which is the 7th element. So presumably it should be declared as...
  24. Replies
    4
    Views
    861

    Maybe you should actually try that eric. I see...

    Maybe you should actually try that eric.
    I see what you're getting at, but it doesn't work in this situation.
  25. Replies
    4
    Views
    861

    The problem is that when you enter a line from...

    The problem is that when you enter a line from the console it has a "newline" character at the end. The gets function reads an entire line, including the newline character. But the scanf function...
Results 1 to 25 of 494
Page 1 of 20 1 2 3 4