Hi all,
I have created a client and server program in c++ based i=on windows sockets.
I have some problem that when i execute the program no message appears on the server end and after that the program exits.Data is sending to server but it is not responding back.
i am pasting my code below
****Server code
===========****
#ifndef WIN3...
I have been going through a few published papers which details algorithms and data structures which can be used for implementation of a thread library. I searched online to view any existing implementation of the same, and I could only find LFThreads(only its documentation, not its source code).
Have any of you worked on/used a lock-fre...
I'm trying to compile an open source project on windows under mingw/msys.
The makefile contains (among others) this line
@${MAKE} --no-print-directory -C . -f physfs.make
physfs.make contains (among others) these lines:
ifndef CC
CC = gcc
endif
when I ran make I get the following error:
Creating obj/Debug/physfs
physfs.c
make[1...
In regards to C what is a stub routine? Also an example would be much appreciated as well.
...
I have made a toolchain using this script: http://gist.github.com/403608 (more or less modified to get it to work)
Everything is installed and now when I try to compile using it I get an error when I ./configure it says that my C compiler cannot create exeicutables. I'm thinking that my compiler just doesn't know where to look for all ...
The code below is me trying to instantiate a 2d array, and it instantiating incorrectly:
THE CODE:
FILE* kernalFile = fopen(argv[1], "r");
int rKernalSize;
fscanf(kernalFile, "%d", &rKernalSize);
unsigned int rKernal[rKernalSize][rKernalSize];
Data froma break point right after that code is ran:
rKernalSize VALUES:
N...
I'm trying to read a binary file into a C# struct. The file was created from C and the following code creates 2 bytes out of the 50+ byte rows.
unsigned short nDayTimeBitStuffed = atoi( LPCTSTR( strInput) );
unsigned short nDayOfYear = (0x01FF & nDayTimeBitStuffed);
unsigned short nTimeOfDay = (0x01F & (nDayTimeBitStuff...
I'm trying to print the values in a struct timeval variable as follows:
int main()
{
struct timeval *cur;
do_gettimeofday(cur);
printf("Here is the time of day: %ld %ld", cur.tv_sec, cur.tv_usec);
return 0;
}
I keep getting this error:
request for member 'tv_sec' in something not a structure or union...
Suppose I have an ELF binary that's dynamic linked, and I want to override/redirect certain library calls. I know I can do this with LD_PRELOAD, but I want a solution that's permanent in the binary, independent of the environment, and that works for setuid/setgid binaries, none of which LD_PRELOAD can achieve.
What I'd like to do is add...
Hello,
I'm building an Authentication Package for Windows and I'm now just trying to make a skeleton for the package that I'm going to build.
The Package at some point in time will need to call MSV1_0 but the workflow of my authentication is forbidding me from implementing it as a SubAuthentication Package for MSV1_0.
Now, please exa...
Possible Duplicate:
How to access the fields of a timeval structure
continue to the link below please about this problem:
http://stackoverflow.com/questions/4029923/how-to-access-the-fields-of-a-timeval-structure
...
Assuming I have a piece of code similar to this:
SOMESTRUCTURE *info;
info = malloc(sizeof(SOMESTRUCTURE));
while(something...)
{
info->mini[0] = malloc(sizeof(SOMESTRUCTURE *)); // It's a structure inside the same structure
while(something...)
{
info->mini[x]->name = malloc(sizeof(char *)*strlen(name));
...
I understand there is a SecureZeroMemory function in C.
The function implementation is defined in <WinnNT.h> as RtlSecureZeroMemory function.
QNS: How can SecureZeroMemory be used in Delphi? Did Delphi release a library that contains that function? I'm using Delphi 7. Windows.pas only has ZeroMemory but not SecureZeroMemory.
...
I have been spending some time in debugging a programme which gives segmentation fault. The bug is quite indeterministic and intermittent, which is annoying. I narrowed it down to the calling of strtok. I suspect that it is the calling of strtok to split string in two different threads that causes the segmentation fault. Can I call strto...
I am actually seeking the multiMAPS benchmark source code written in C. It is a benchmark that measures memory bandwidth.. Did somebody heard about it?
...
I have few doubts regarding how windows manages a .dll's memory.
when .dll's are loaded into the host
process, how is the memory managed?
Does .dll get access to the entire
memory available to the host process
or just a portion of it? i.e is
there a limitation when memory is
allocated by a function inside the
.dll?
Will STL classes li...
Why are function arguments pushed on the stack in right to left order?
...
I am debugging a C program (GCC and GDB in Linux and Visual Studio in Windows) that gives different results on two different architectures. I'd like to compare execution on each architecture by tracing the changes to the values stored in variables in order to locate differences.
file main.c, line 234. Variable A changes from 34 to 23
f...
Hello,
I know the program name is passed as the first argument, and next simple example will print it to the standard output :
#include <iostream>
int main ( int argc, char *argv[] )
{
std::cout<<argv[0]<<std::endl;
}
Is there a function to get the program name?
EDIT
I am starting the program from the shell, and the above code wi...
I have a 2d array matrix[10][10] that I'd like to inspect at debug time.
I understand that I can do this in GDB using
p *matrix@10
But it outputs this in one line, making it difficult to read.
Is there a way to have this output formatted in any way, lets say as a matrix?
...