Search:

Type: Posts; User: john.c

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    1,000

    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...
  2. Replies
    4
    Views
    561

    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.
  3. Replies
    4
    Views
    561

    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...
  4. Standard ASCII is a 7-bit code so is only defined...

    Standard ASCII is a 7-bit code so is only defined for 0 to 127. The high bit is used as a parity bit.
    Extended systems can define values for 128 to 255.


    You mean 0 to 255.


    You mean -128 to...
  5. It should also be mentioned that sizeof(short)...

    It should also be mentioned that
    sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long long)
  6. Although that is an error (I mentioned it in a...

    Although that is an error (I mentioned it in a comment in the code), it wouldn't have caused a problem since a FILE struct is larger than a pointer. It would've just wasted a little space.
  7. In main, lists needs to be FILE**. That makes it...

    In main, lists needs to be FILE**.
    That makes it a pointer that can point to an array of FILE*.

    And you need to pass it to create_files as a FILE***.
    The extra level of indirection allows you...
  8. Replies
    3
    Views
    1,149

    Your winner function doesn't have a return value...

    Your winner function doesn't have a return value for NOTHING, i.e., not a win for X or O and not a draw. In that case it just "falls off the end" of the function and returns an arbitrary value. Try:...
  9. Replies
    3
    Views
    735

    I don't understand your string format, but if you...

    I don't understand your string format, but if you have an unsigned integer and you want those bits as separate values:


    #include <stdio.h>

    int main() {
    unsigned n = 0xabcde; // 101010...
  10. Replies
    5
    Views
    10,516

    I don't think it has anything to do with COM per...

    I don't think it has anything to do with COM per se. The line you think might not be necessary fills mSwapChainBuffer[i] with valid data. Without that line mSwapChainBuffer[i] will presumably have...
  11. Replies
    5
    Views
    10,516

    Why do you think this "doesn't seem to really do...

    Why do you think this "doesn't seem to really do anything"?


    ThrowIfFailed(mSwapChain->GetBuffer(i, IID_PPV_ARGS(&mSwapChainBuffer[i])));
  12. Replies
    1
    Views
    739

    These two do not match: const char *...

    These two do not match:


    const char * const * buf[50];
    const char * const * x;

    The [50] is kind of like adding yet another *.
    Have you tried it with just
  13. Some people are simply not worth helping.

    Some people are simply not worth helping.
  14. I have no idea what you are referring to here. If...

    I have no idea what you are referring to here. If you actually think this is "advanced" then you are many years away from "writing a compiler".

    Obviously going through the dimensions of a...
  15. @natty, I was using the term "node" to mean...

    @natty, I was using the term "node" to mean whatever you freed. The point is that whatever you actually free needs to be manually set to NULL so that you can subsequently tell that it was freed....
  16. Replies
    9
    Views
    848

    It turns out that encrypt doesn't work properly...

    It turns out that encrypt doesn't work properly anyway.
    It's up to you to test it with many inputs, not just a couple.
    The input "ebfacd" doesn't work.
    Sorted it's "abcdef", but the result here is...
  17. Replies
    9
    Views
    848

    It looks like all you might need to do is remove...

    It looks like all you might need to do is remove the line:


    is_used[i] = true;

    Also, when printing the string, remember that the row index comes first:


    for (int c = 0; c < columns; ++c)
    ...
  18. If I understand what you are asking, maybe just...

    If I understand what you are asking, maybe just set the pointer to NULL yourself after freeing it. That's pretty common practice.


    free(node);
    node = NULL;

    BTW, I've never heard the term...
  19. Replies
    9
    Views
    848

    If you consider it "correct" to get an 18...

    If you consider it "correct" to get an 18 character output from a 23 character input then I can't help you.
    Maybe post your real code since the garbage you posted above doesn't even compile.

    At...
  20. Replies
    9
    Views
    848

    What do you get for phrase "one two three four...

    What do you get for phrase "one two three four five" and key "king"?
  21. Replies
    5
    Views
    3,071

    It's possible to do this without a 2D array....

    It's possible to do this without a 2D array.
    BTW, "columnuar" isn't a word, and "create" has an 'e' at the end (even Thompson agrees :)).


    #include <stdio.h>
    #include <string.h>
    #include...
  22. I did just comment out that one file of yours,...

    I did just comment out that one file of yours, but as I said, the library is also apparently missing a function (unless it's one of your missing functions that you named like one of the library...
  23. It should be okay. It's strange that pthread_exit...

    It should be okay. It's strange that pthread_exit doesn't clean up properly, though. Maybe it's the way that valgrind attaches to the process that screws it up and it normally cleans up properly....
  24. It is a long-standing valgrind bug (if it can...

    It is a long-standing valgrind bug (if it can even be considered a bug) when working with pthreads related to the exit call at the end of the thread function. You can avoid it by actually returning...
  25. Replies
    5
    Views
    873

    What about the spacing between words? And what...

    What about the spacing between words?
    And what do you do with punctuation?
    I assume if the input sentence is:

    Here is a dirty sentence using rotten words, a sentence with dirty punctuation.
    ...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4