C is a general-purpose computer programming language used for operating systems, games and other high performance work.

learn more… | top users | synonyms

0
votes
2answers
266 views

Is there a better way to organize my module tests that avoids an explosion of new source files?

I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
1
vote
0answers
106 views

using flat file vs sqlite db for frequent data grabbing in a cron job

I have some automated task to be done using certain types of logs generated on the server end of each day. Log files contains specific machine identification "MAC" that is to be re-written in to ...
1
vote
0answers
93 views

What is the underlying mechanism behind va_list and where is it defined?

http://www.cplusplus.com/reference/cstdarg/va_list/ According to the above link, va_list is an argument or parameter used in some macros - va_start, va_arg, va_end. These macros are present in the ...
1
vote
0answers
113 views

How to extract the active code path from a complex algorithm

I have been puzzled lately by an intruiging idea. I wonder if there is a (known) method to extract the executed source code from a large complex algorithm. I will try to elaborate this question: ...
0
votes
0answers
7 views

Defining property and find substitution for copy function of python in cython

I want to cythonize a code in python to speed up the code. In the following you can see my attempt to make my python class understandable for cython: import numpy as np cimport numpy as np ctypedef ...
0
votes
0answers
65 views

Parsing mathematical experssions with two values that have parentheses and minus signs

I'm trying to parse equations like the ones below, which only have two values or the square root of a certain value, from a text file: 100+100 -100-100 -(100)+(-100) sqrt(100) by the minus ...
0
votes
0answers
52 views

wrap mysql API for gui use

Some time ago now, I've written a command-line tool, that connects to MySQL, and through a series of commands, does all sorts of good stuff. It was originally intended to be used by myself and, ...
0
votes
0answers
220 views

How does a dynamic library's references to a static variable get translated once in the running app?

If a dynamic library exports the address to a global variable defined within the library, how are accesses to that variable translated during dynamic linking so that a running application can interact ...