I am assigned to port a big project from a dialect of C99
to Visual C++ 2013
.
The dialect of C99
:
When
C99
andC++
have different behaviors, choose C++.Supports some
C++
features, e.g. function/operator overloading.Supports some
C99
features, e.g. compound literals, variadic macros, and designated initializer.
Before getting stuck, I wanna know if we can write C99/C++
mixed code in VS2013
?
It must be compiled on both compilers, I guess there might be some amazing pragmas like
struct T {
int data;
};
#pragma CompiledByC99_begin
struct T tmp = { .data = 1 };
#pragma CompiledByC99_end
Unfortunately, nothing found after Googling. Does such hack exist in VS2013
?