Bit Operation in C / C++

C
When we talk Bit Operation in C or C++. Does bit start from bit0 or bit1 ? Which one is more make sense? As I know A bit can assume either of two val...
2 years ago

c++ sizeof( ... )

C++
#include <cstdlib> #include <iostream> int main(int argc, char *argv[]) { cout << "size of String " << si...
3 years ago

C# timers.timer

C#
My application looks like this: I have an MDI parent form - form1, the form that starts and stops the timer - form 2, and a timerCalls class with all...
3 years ago

.DLL C++ function to C#

C#
I'm using mpusbapi.dll in WPF project using C#. In C++ the function prototype is: DWORD MPUSBWrite(HANDLE handle, PVOID pData,...
2 years ago

Calling C/C++ from python?

C
What would be the quickest way to construct a python binding to a C or C++ library? (using windows if this matters)
2 years ago

mix cobol with c++/C

C++
I tried to mix COBOL code with C++, but i not have success :( I see this topic in IBM forum: http://publib.boulder.ibm.com/infocenter/comphelp/v111v1...
2 years ago

Validate DNA in C/C++

C
I am iterating over DNA sequences pulling out chunks of 5-15 bases at a time into C++ std::string objects. Occasionally, my string will contain a non...
2 years ago

calling c function from C#

C#
as a simple example, i have a C function which receives an int,increment it and return incremented value.on the other side I enter the input number to...
2 years ago

Comma in C/C++ macro

C
Say we have a macro like this #define FOO(type,name) type name Which we could use like FOO(int, int_var); But not always as simple as that: FO...
3 years ago

Extracting C / C++ function prototypes

C
I want to do this: extract_prototypes file1.c file2.cpp file3.c and have whatever script/program print a nice list of function prototypes for all f...
3 years ago

Faster modulus in C/C#?

C#
Is there a trick for creating a faster integer modulus than the standard % operator for particular bases? For my program, I'd be looking for around 1...
3 years ago

Xcode & C/C++ project

C
I want to use Xcode for C/C++ project. I don't care about build/compilation, all i want is to use it as editor. Needs: - Find symobol , References , ...
2 years ago

C# COM INTEROP in c++

C#
I'm trying to call my C# dll from a C++ client, so far I have the dll all setup and in my registry (I can create and call it from the power shell for ...
2 years ago

Memory alignment in C/C++

C++
I was reading Game Coding Complete 4th edition. There is a topic regarding Memory alignment. In the code below author says that first struct is really...
2 years ago

CRC32 C or C++ implementation

C
I'm looking for an implementation of CRC32 in C or C++ that is explicitly licensed as being no cost or public domain. The implementation here seems n...
2 years ago

C/C++ global variable uniqueness?

C
Consider the following: // defs.h extern "C" { typedef struct t_state { bool b; } t_state; static t_state _state; void...
2 years ago

Endless loop in C/C++

C
There are several possibilities to do an endless loop, here are a few I would choose: for(;;) {} while(1) {} / while(true) {} do {} while(1) / do {}...
2 years ago

C / C++ / C#: Howto do "mount -a"

C
Question: In C/C++/C#. (I need it for C#, but C and C++ is also fine). How can I do a mount -a on Linux. I mean programmatically, without starting a...
2 years ago

Readability a=b=c or a=c; b=c;?

C#
I have a class which has a group of integers, say foo() { int a; int b; int c; int d; .... string s; } Now the question is for the best...
2 years ago

C and C++ linkage with extern "C"

C
I have a C++ function defined in a .h file as follows and implemented in a .cpp file: extern "C" void func(bool first, float min, float* state[6], fl...
3 years ago