Assigning c-array to c++ vector

C++
I have a question about lifetime of onstack created arrays and about transforming them to c++ vectors. For ex I have two functions: void getVector() ...
2 years ago

C/C++ Free alternative to Lint?

C
I'm interested in a free tool that can statically check my C++ code like Lint does. Any hints?
2 years ago

Is C notably faster than C++

C
As far as I understand all scripting languages and core scientific programs are usually written in C; this renders the implementation messy yet in a w...
2 years ago

Does C++11 have C#-style properties?

C#
In C#, there is a nice syntax sugar for fields with getter and setter. Moreover, I like the auto-implemented properties which allow me to write publi...
2 years ago

C/C++ module vs python module.

Python
In Python ( CPython) we can import module: import module and module can be just *.py file ( with a python code) or module can be a module written in C...
2 years ago

Tool to visualise code flow (C/C++)

C
Do you have any sugestions of tools to ease the task of understanding C/C++ code? We just inherited a large piece of software written by others and we...
2 years ago

C# import a structure from C DLL

C
I have the following C header for two structs: struct CustomerInfo { char* Id; char* Name; char* Address; }; struct CustomerList { C...
2 years ago

Is va_list incompatible between C and C++?

C
I'm using a library (GNU MicroHttpDaemon) which passes out error messages through a callback which takes a va_list. I pass in a function pointer and i...
2 years ago

Create unmanaged c++ object in c#

C#
I have an unmanaged dll with a class "MyClass" in it. Now is there a way to create an instance of this class in C# code? To call its constructor? I tr...
2 years ago

void pointers: difference between C and C++

C
I'm trying to understand the differences between C and C++ with regards to void pointers. the following compiles in C but not C++ (all compilations do...
2 years ago

Getting big random numbers in C/C++

C
Standard rand() function gives numbers not big enough for me: I need unsigned long long ones. How do we get really big random numbers? I tried modifyi...
2 years ago

Iterate over a C++ container in C

C
I am attempting to write a C wrapper for some C++ data structures. Right now I've got the following in foo.cpp typedef std::map<unsigned int, void...
2 years ago

Call C# method with string from c++

C#
I know similar things has been asked before but I just cant get it to work.. I have a c# function in a dll. public int setUser(string str){ I a...
2 years ago

NLog in mixed C#\C++ Application

C#
We are using NLog in our solution, which is primarily a C# application. We do however have a native C++ DLL project and a managed C++ DLL project tha...
2 years ago

C/C++ #include formatting best practice

C
In my time with C/C++ I have encountered different ways to handle the file path for the #include directive when including your .h file in your .cpp/.c...
2 years ago

Eclipse: C/C++ Plugin Download Link?

C
I'm downloaded the Java EE version of Eclipse 3.5.1. Can I now use it to edit C/C++ with the proper plugin? I went to Help >> Install New Software b...
2 years ago

Mysql Connector C++ Unbuffered ResultSet C++

C++
I have a table that holds large data. I want to fetch all the data and process them one by one. According to the documentation here: https://dev.mysq...
2 years ago

Emulate C# Random() in C++ (Same Numbers)

C#
Is there a way to implement the C# Random() class in C++? I specifically need to generate the same number sequences based on a given seed. The scenar...
2 years ago

Set C Function Pointer to C# Function

C
I need to set a callback function in a C library equal to a C# function, and can't figure out a way to do it without either dlopen or kernel32, which ...
2 years ago

c++ char c[256] in getLine

C++
Im viewing some old code that has no comments which I try to understand, the code: std::vector<std::string> CardFactory::readFile(std::string f...
2 years ago