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_...
Type: Posts; User: ldb88
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_...
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...
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,...
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!
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...
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...
Here you go:
#define DLL_EXPORT
#define MAX_LENGTH 10
#include "dll.h"
TCHAR str[MAX_LENGTH] = "";
int current_length = 0;
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...
#define DLL_EXPORT
#define L 10
#include "dll.h"
TCHAR str[L] = "";
int l = 0;
extern "C"
{
How can I take a screenshot and store it into a BITMAP?
It is working much better now, with TABLESIZE set to 100 or 1000. Thanks.
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...
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...
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...
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...
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...
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...
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;
}
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.
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...
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...
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...
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 =...
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);...
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...