Can anyone please tell me why compiling a C# application with a .cs file containing the following piece of code is giving me an error . See below.
namespace defintions
{
unsafe public struct name
{
char* firstname;
char* lastname;
} ;
class Functions
{
[DllImport("C++Dll.dll")]
public unsafe static extern long func(name *); //error : Identifier expected
}
}
Your function’s parameter doesn’t have a name (name * isn’t a name).
Change it to