Now, I'm not saying that I think that this would be anywhere near proper coding practice (assuming it's even possible); this question arises from a 2am mistake: Assume class definition resembling the following:
class myClass
{
public:
void myMethod(const int & name);
}
and definition:
void myClass::myMethod(const int & altName)
{
//manipulate altName
}
Note that parameter of both declaration and definition are of type const int &, the only difference is the variable name. I know that this does not (in Visual Studio 2012) throw a compiler error or warning, but could it cause an error while running the program?
Thanks!