I use C source to include C++ hearder, but compiler is not identify C++ keyword (ex: using, class...) .
Is there any method to solve this problem?
this is more of a general C and C++ programming question than a VisualDSP++ question. Most C/C++ books should cover the mixing of C and C++ code within an application.
There are many things to consider when calling C++ code from C. For example, C++ mangles the names of symbols in the objects produced by the tools. This name-mangling encodes the types of parameters into the function names, to allow overloading of functions by their types. The means that when you call a C++ from C, you must call it using the mangled name.
For example, calling:
with values 0,1 would be performed as:
Things are further complicated by templates and classes. Calling class member functions is not recommended. When you call a member function in C++:
This is translated by the compiler into a "C" style call to the member function foo(). Then this pointer (in this case the address of object a) is passed as a hidden first parameter to foo, followed by any further parameters to the function. As you can see this can get very confusing and we don't recommend that you do this unless it is completely necessary.
Retrieving data ...