-7

Hi I have a code at http://pastebin.com/CjCd5APn. Problem is that during compilation I get tons of errors like:

Error: Identifier "lastButton" is undefined in "ft800.cpp", Line: 406, Col: 6  
Error: "this" may only be used inside a nonstatic member function in "ft800.cpp", Line: 740, Col: 6  
Warning: Nonstandard qualified name in global scope declaration in "ft800.cpp", Line: 445, Col: 12  

Do you have an idea why is it happening? Did I omit something?

Weather Vane
  • 33,872
  • 7
  • 36
  • 56
oneat
  • 10,778
  • 16
  • 52
  • 70
  • 1
    The error messages are enough clear. The compiler issues them personally for you. – Vlad from Moscow Nov 22 '16 at 21:20
  • @VladfromMoscow i follow some of your your answers and it seems that you are a great C++ programmer. Can you please see this question http://stackoverflow.com/questions/40743948/the-c-equivalent-of-cs-format-string and give an answer, because I get not a single answer yet. Thank you. – user7140484 Nov 22 '16 at 21:30
  • but lastButton is defined, and functions are not static... and I don't even know what third means. – oneat Nov 22 '16 at 21:30
  • You omitted posting the *text* of your code in your question. – Thomas Matthews Nov 22 '16 at 21:35
  • I can't post it because it is too big - that's why I used pastebin. And if I posted it without some declarations u would probably start asking about them before the main problem. – oneat Nov 22 '16 at 21:36
  • @yanoyesterday, trying hijack WHAT? What do you mean? – user7140484 Nov 24 '16 at 11:35

1 Answers1

-1

The problem was with define in the top. I couldn't find it but now it is solved.

define directive should always be written so it can never be used by accident in code. The best way to do this is to use uppercase letters as it is reserved for preprocessor language.

Error: declaration does not declare anything

Community
  • 1
  • 1
oneat
  • 10,778
  • 16
  • 52
  • 70