Search:

Type: Posts; User: ldb88

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,526

    I think column-major vs. row-major would only...

    I think column-major vs. row-major would only become a problem if the array were multidimensional. However, this is just a 1d array.

    c.h


    #ifndef C_H
    #define C_H

    #define cFunc cfunc_...
  2. Replies
    4
    Views
    1,526

    I'm using the Intel compilers. Name mangling is...

    I'm using the Intel compilers. Name mangling is not a problem - I've already called several functions/subroutines going both directions. The problem is passing not only a pointer, but a pointer to...
  3. Replies
    4
    Views
    1,526

    C-Fortran Interface

    I am writing a program in Fortran and C. I have a pointer to an array in C, and I have a Fortran subroutine that needs to access the array. My Fortran variable is declared as



    INTEGER,...
  4. Thread: Signals?

    by ldb88
    Replies
    4
    Views
    1,358

    Signals?

    In Linux, I have created a signal handler to handle the SIGUSR1 signal.

    How can I do something equivalent in Windows (this is a console app)?

    Thank you!
  5. Replies
    2
    Views
    2,602

    Problem with std::vector

    I've run into an error that I can't explain. Here is some output from valgrind:



    ==573== Invalid read of size 1
    ==573== at 0x40273E8: memmove (mc_replace_strmem.c:517)
    ==573== by...
  6. Replies
    8
    Views
    4,753

    Here is where I got the 2147483648 from:...

    Here is where I got the 2147483648 from:
    http://msdn2.microsoft.com/en-us/library/ms646267.aspx#_win32_Keystroke_Messages
    I'm new at this, but to me that looks like I should & with 2^31 (which is...
  7. Replies
    8
    Views
    4,753

    Here you go: #define DLL_EXPORT #define...

    Here you go:


    #define DLL_EXPORT
    #define MAX_LENGTH 10

    #include "dll.h"

    TCHAR str[MAX_LENGTH] = "";
    int current_length = 0;
  8. Replies
    8
    Views
    4,753

    Yeah well C++ is case sensitive and no one else...

    Yeah well C++ is case sensitive and no one else was initially meant to be reading this code so I'm not really worried about the variable/constant names. I can change it if its going to cause a...
  9. Replies
    8
    Views
    4,753

    Hook and Keystroke Question

    #define DLL_EXPORT
    #define L 10

    #include "dll.h"

    TCHAR str[L] = "";
    int l = 0;

    extern "C"
    {
  10. Replies
    2
    Views
    1,673

    Screen Capture to Bitmap

    How can I take a screenshot and store it into a BITMAP?
  11. Thread: Stack Overflow

    by ldb88
    Replies
    4
    Views
    1,474

    It is working much better now, with TABLESIZE set...

    It is working much better now, with TABLESIZE set to 100 or 1000. Thanks.
  12. Thread: Stack Overflow

    by ldb88
    Replies
    4
    Views
    1,474

    Stack Overflow

    Ok I'm not getting the stack overflow problem anymore. Is there a way to change the thread title?
    I am having another problem - this is very slow:

    main.cpp


    #include <iostream>
    #include...
  13. Replies
    12
    Views
    4,126

    The problem is VERY similar to a game of Boogle,...

    The problem is VERY similar to a game of Boogle, but it is a little different. Yes, 'Qu' is involved. I was planning on using a character other than 'a' to 'z' to represent 'Qu' (such as '1'). But...
  14. Replies
    12
    Views
    4,126

    Instead of just using plain strings, I could...

    Instead of just using plain strings, I could create a structure like this:


    struct word{
    string theWord;
    unsigned int* indice;
    unsigned int score;
    };

    and dynamically allocate...
  15. Replies
    12
    Views
    4,126

    Ok that makes sense. But how will the inability...

    Ok that makes sense. But how will the inability to use the same cell twice factor in? If I just get the best 3, they will likely use the same cell more than once (be incompatible). Also, if I just...
  16. Replies
    12
    Views
    4,126

    I am not sure about this, but if you can wrap...

    I am not sure about this, but if you can wrap around, I would just have to add a link to that node as well, correct?

    It might be a good idea to limit the size of the string to say 10 characters...
  17. Replies
    12
    Views
    4,126

    Every possible combination/best combination

    I am given a 5x5 matrix of characters, each character having a certain value. I need to find the best (highest sum of the values of the included characters) 3 words that can be made. Any number of...
  18. Thread: Median

    by ldb88
    Replies
    4
    Views
    2,296

    yeah check ur main(). im getting 5 as well. it...

    yeah check ur main(). im getting 5 as well. it should look something like this:


    int main(){
    int data[5] = {4,4,5,6,6};
    cout << Median(data, 5) << endl;
    return 0;
    }
  19. Replies
    12
    Views
    1,768

    Ok I understand now. I had put char *input...

    Ok I understand now. I had put


    char *input = new char[1000];
    input = "[3,2;1,2]";

    rather than using strcpy. Thanks for all the help.
  20. Replies
    12
    Views
    1,768

    My instructor had an example in which he created...

    My instructor had an example in which he created the char array for the second parameter. I changed it to ",;]" (thanks for pointing out ']' swoopy) and got rid of split. But that still doesn't...
  21. Replies
    12
    Views
    1,768

    Sorry I didn't realize it is pretty much C...

    Sorry I didn't realize it is pretty much C (except new and delete). If someone wants to move it, that'll be fine with me. If it worked correctly, what the code above should do is copy all of the...
  22. Replies
    12
    Views
    1,768

    Why am I having an access violation?

    Here is my code:


    double **double_array;
    double_array = new double*[rows];
    for(int i=0;i<rows;i++)
    double_array[i] = new double[columns];
    char split[3];
    strcpy(split, ",;");
    for(int...
  23. Thread: Bitmaps

    by ldb88
    Replies
    6
    Views
    2,114

    I get "The handle is invalid" for the first one,...

    I get "The handle is invalid" for the first one, and "The specified resource type cannot be found in the image file" for the second one.


    SetLastError(0);
    TCHAR text[256];
    HBITMAP hBmp =...
  24. Thread: Bitmaps

    by ldb88
    Replies
    6
    Views
    2,114

    The commented out parts are things that I have...

    The commented out parts are things that I have tried, but it made no difference.


    //LoadImage(hInstance, MAKEINTRESOURCE(IDB_BITMAP1), IMAGE_BITMAP, 35, 37, LR_DEFAULTCOLOR);...
  25. Thread: Bitmaps

    by ldb88
    Replies
    6
    Views
    2,114

    I've tried that. The way I understand it, when...

    I've tried that. The way I understand it, when CreateWindowEx fails and returns 0, the HWND stored for the static control is also 0, and when you send the message you are really sending it to an...
Results 1 to 25 of 41
Page 1 of 2 1 2