简体   繁体   中英

C++ error Undeclared identifier

I cant solve it... Help Please

projects\\intento2\\intento2\\as.cpp(128): error C2065: 'Generate' : undeclared identifier

    mov ecx,[ebp+32]
    mov edx,[ebp+28]
    PUSHAD;


 if (Generate)
{
 GenerateTexture(pDevice, &texGreen , D3DCOLOR_ARGB(255,0,255,0));
 Generate = false;
}

Obviously, the compiler is complaining that no symbol Generate exists at the point where you're trying to use it.

It could be any number of things, such as:

  • misspelling the name;
  • having it declared inside an inactive #ifdef ;
  • not including the header file where it's declared; or
  • a dozen other possibilities.

We can't actually tell from the code you've posted how (or if) you've defined it so you'll have to go and find that first. Once you find and post that (or create it if you've neglected to do so), we should be able to help further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM