Code generation error when passing arguments by reference New comment mfdesire 2010.11.16 22:51 Hi all, Here is a piece of code, generating a 'code generation error' compilation error. class A{ public: virtual int doSomething( const int& elementsCount, double& arrData[] ) { return 0; }}; A* g_pA; int OnInit(){ g_pA = new A(); int elementsCount = 1; double arrTemp[ 1 ]; g_pA.doSomething( elementsCount, arrTemp ); return(0);} void OnDeinit(const int reason){ delete g_pA;} void OnTick(){} Does anybody have any clue what is the compiler's problem? Thanks in advance, Maxim getting a "Specified symbol is not selected" popup call for the cooperation of programmers More Documentation for smart Imports Test Account 2010.11.17 09:56 #1 Thank you for your message.Bug was fixed, wait for new build. New comment
Hi all,
Here is a piece of code, generating a 'code generation error' compilation error.
class A
{
public:
virtual int doSomething(
const int& elementsCount,
double& arrData[]
)
{
return 0;
}
};
A* g_pA;
int OnInit()
{
g_pA = new A();
int elementsCount = 1;
double arrTemp[ 1 ];
g_pA.doSomething(
elementsCount,
arrTemp
);
return(0);
}
void OnDeinit(const int reason)
{
delete g_pA;
}
void OnTick()
{
}
Does anybody have any clue what is the compiler's problem?
Thanks in advance,
Maxim