I'm working on a multi-project program in C++/CLI and parameter names for functions, constructors etc. are not showing up properly in the Intellisense window. When I start typing a function call within the project, all goes well, but as soon as I use said project in another project (still within the same solution), VS shows funky parameter names (e.g. myobj.move(int A_0,int A_1)
) instead of the names I gave them in the code. I've tried using the ///<param>
thing, but that works only within the same project, not in other projects (again, in the same solution). I've enabled the /doc
option in the project properties, but that didn't do it. Is there a way to feed the generated XML file (or .xdc I guess?) into Intellisense? Thanks in advance!
Asked
Active
Viewed 76 times
0
-
This is not abnormal, C++ doesn't require parameter names but .NET does. So if you didn't write them in the *declaration* of the method then the compiler is forced to fall back to auto-generated names. Like A_0, etc. – Hans Passant Dec 22 '14 at 19:24
1 Answers
0
This happens when you declare the function prototype in a header file without the argument names:
#file.h
ref class A
{
void move(int ,int );
}
You should just add the names you want:
file.h
ref class A
{
void move(int MyArgument1,int MyOtherArgument);
}

Yochai Timmer
- 48,127
- 24
- 147
- 185