ok so basically if i want a "global" #define i put it in a file.h (and then include it where needed) and if i want a "local" #define i can put it in a file.cpp
Type: Posts; User: mynickmynick
ok so basically if i want a "global" #define i put it in a file.h (and then include it where needed) and if i want a "local" #define i can put it in a file.cpp
If i put a #define NAME 100 inside a file.cpp instead of a file.h, is it visible only in file.cpp (or also in other moduules)??
thank you
yeah i should but i am not able to write a function with a variable number of arguments (input parameters).. do you have a simple but fully written example (of the sintax for a variable number of...
i have to use MS Vis. cause i was inserted into a project started by some one else. I think it also uses special dlls for interfacing with PLC software running on the same Windows machine , which I...
i have a program that openms and closes sockets very often
how to periodically close all by chance not correctly closed sockets ? do i have to a keep a black list?
In this case I am talking of a C...
i have disabled the directive /GL (link time code generation) (I am using MS Visual 2008 Express Ed. with Berkley sockets) and the problem seem to have vanished, but perhaps just in a way similar to...
that's very annoying
under Linux the NUL at the end is guaranteed
I got an issue with snprintf
I am porting a software (from Linux to Windows) which makes massive use of snprintf and I found out that in Windows the terminating null char is not put at the end in...
i agree
I have this function where something very strange happens:
int DGRAMSocketRead_Wait ( int sock, char* iBuffer , unsigned int iToReadByteNumber, struct timeval * TimeOut, UINT32 *...
In one windows application I am developing I am periodically:
opening a socket with socket()
then I call connect (to server IP and port)
then i exchange some data with send/recv
then I close the...
and actually to be combined with CreateThread()
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID...
Hi
what sort of calls are similar to pthread_cleanup_push/pop under windows (specifically in CE I need them)??
I am afraid I don't understand. If i write the dots I suppose i get a compiler error.. My code specified was actually pseudocode. How to reference the vars then? What is a va_list?
I need to give a unique interface for different implementations of outputs for different platforms. To do this i need to define a prototype with a variable number of arguments in the end like...
hahahahahaha
yes a competition with myself ;)
The fact is that the faster i go the more I can increase the resolution, so the precision of the detections i am performing
I have already...
the performance objectives are : "as fast as you manage"
"profile your code" : what you mean?
I have already gone from th 200 msec first version to the 16 msec actual version of a severe image...
ok i agree with most of what you say but i still don't get: are you telling me stack data is faster than static data outside the function??
of course cache miss is important but as you say independent from this problem
and in this case the arrays are just used from begin till end
my question is : which of the 3 examples have...
Considering vars, structs or arrays of medium size which allows to allocate them on the stack (for instance as function local vars) the question is:
If the program performs massive computaions...
I have been told and I realized myself that in many C situations if i have two structs of the same kind I can assing one another and what will happen will be a corresponding assignment member by...
when i write on a (DGRAM) socket i get often
EAGAIN
Non-blocking I/O has been selected using O_NONBLOCK and the write would block.
why? The buffer is about 105k and i think I am writing at a...
As i had many interesting discussions here that i sometimes also go and revise for some doubts that might arise back of which i partially forgot issues, i ask you:
how long is a thread/post kept...
It happened to me the following strange thing:
I had a function1_1() in file1.c called by another routine in file2.c
without it being declared extern inside file2.c (or any included header)...