Generated import libraries (the ones used to link a program that will load a dll) AFAICS implements the various calls to the imported functions as assembly jmp statments.
This indeed looks like a very optimal solution. It does not require pushing the arguments a second time, neither returning from a call.
I want to create my own import...
I have a binary image in Matlab, and I need the binary array(0 and 1) in a C program,
How can I import it?
I can save the binary image in Matlab as ".mat" but I don't know how to read the mat file in C.
Also I thought maybe I can save the binary image in Matlab as ".bin" which is readable in "C" but again I don't know how to save an ima...
I have a git repository (covering more or less project history) and separate sources (just a tarball with few files) which have forked some time ago (actually somewhere in 2004 or 2005).
The sources from tarball have undergone quite a lot of changes from which I'd like to incorporate some. Now the question is - how to find out what was ...
I am trying to build a package (libnet) in Solaris and I found that in Solaris there are no u_xxx_t but uxxx_t defined in sys/types.h
I had 2 questions:
1-Shouldn't autotools take care of this for me?
2-I guess I'm not the first one facing this (although google was little help) is there a standard/eficient/correct/quick way of overcom...
I want to copy and paste a C function I found in another program into my C++ program.
One of the function arguments uses the "this" pointer.
void cfunction( FILE *outfilefd, const VARTYPEDEFINED this);
The C++ compiler errors here on the function prototype:
error C2143: syntax error : missing ')' before 'this'
How do I make this...
how to do comparisons of float values using bitwise operator?
...
I need a queque system that runs as fast as possible but doesn't slow down the server.
I have a web app (php) that converts different pieces of media (photos,video,etc). When someone wants to convert a file the command to convert goes into a database. I need a program that can run the commands in a way that will not crash my server.
I...
I Using rabbit single board computer. I would like to save the data I/O which connected to another rabbit single board computer through wireless connection. Is it able to save the data inside the pc such as .txt file? Thanks.
...
From a standards standpoint, should I use the following from the C++ <limits> header?
UCHAR_MAX which is the c implementation or
std::numeric_limits<unsigned char>::max() which is the C++ implementation.
The result is equivalent between the two versions but should I choose an implementation based on some standard or on readability and ...
I am getting the infamous malloc.c:3074 error when running my code (compiles without issue). I compiled using the -g option. I used Valgrind to determine where the memory allocation issue is happening but the results aren't helping a whole lot. Here is the Valgrind output:
==2710== Invalid write of size 8
==2710== at 0x400FC8: gene...
I've tried to learn the signal handling in C, when found strange behaviour.
When x /= y; executed in the context of the main function the signal handler works. But when the same executed in some function (bad_func) handler is ignored however signal handler for SIGFPE is already set.
Q: Why SIGFPE wasn't caught in a function by my globa...
I need a dinamically allocated bi-dimensional array of objects.
I declared a static pointer to pointer to object as follows:
server_session **server_session::Pglvcl_sess;
There's a method to populate dinamically the array of array of object:
int server_session::createSession()
{
int ret = -1;
// looks for the next available posi...
It is known how to catch the float division-by-zero exception with the usage of
signal(SIGFPE, handler)
but it doesn't catch integer division-by-zero problem even if I setup control word with
_control87(0, _MCW_EM ); (MS VC 2010)
SubQuestion_1: How to catch integer division-by-zero in C program in Windows without usage of SEH EXCEP...
I run into this case a lot of times when doing simple text processing and print statements where I am looping over a collection and I want to special case the last element (for example every normal element will be comma separated except for the last case).
Is there some best practice idiom or elegant form that doesn't require duplicatin...
Hello everyone.
This question may sound cliched but I am in a situation here.
I am trying to implement a finite state automaton to parse a certain string in C. As I started writing the code, I realised the code may be more readable if I used labels to mark the different states and use goto to jump from one state to another as the cas...
How can I set the backcolor of a control (equivilant of control.backcolor in .Net). I tried setBKColor with no luck.
ex: TabHwnd = createWindowEx(NULL,WC_TAB....
then how could I set the back color of TabHwnd?
Thanks
...
I copy and pasted some code that increments an enum:
myenum++;
This code worked fine as it was compiled in VS.NET C++ 2003
I am now developing in VS 6.0 and get the error:
error C2676: binary '++' : 'enum
ID' does not define this
operator or a conversion to a type
acceptable to the predefined operator
How can I get t...
Hi all
I'm in the process of building an email client for an embedded device. We have chosen the University of Washingtons c-client reference implementation as our interface into POP3, IMAP and SMTP servers. Whilst it is working well for us, implementation is taking a long time due to relatively old coding standards and lack of detailed...
Is there a way for windows created with WS_CHILD to inherit the parent's background color rather than default to Dialog Color? I'm trying to do this for a tab control, mainly the part that extends due to the tabs not filling up the area. I want this color to be the parent window's BG.
Thanks
...
I am trying to allocate a block of memory, and store a list of structures without using multiple mallocs for each... this is just a generic example, I don't have the original code I was working with earlier, but this is the general idea, but my problem was that I was getting heap corruption when other parts of my code executed after the ...