Hello
I have class where i declared an array and i want to use the value of same array in other class.
I don't want to create any object to access the array .so i tried declare the array as extern.
code as below
Qt Code:
  1. class emu
  2. {
  3. UCHAR D0[8];
  4. void decimarconverter(UCHAR *answer)
  5. {
  6.  
  7. for(int i =0;i<=7;i++)
  8. {
  9. D0[i] =answer[0]%2;
  10. answer[0] = answer[0]/2;
  11. qDebug()<<"Binary number is D0"<<D0[i];
  12. }
  13. }
  14.  
  15. class emu1
  16. {
  17. extern UCHAR D0[]
  18. void show()
  19. {
  20. for(int i =0;i<=7;i++)
  21. qDebug()<<D0[i]<<"Value";
  22. }
  23. }
To copy to clipboard, switch view to plain text mode 

But i am getting an error
error: 'UCHAR' does not name a type
extern UCHAR D0[];
Can any one let me know why i am getting the error