Type of this?

In the "global" scope, what type is the "this" function when you use the standard arduino environment?

The reason I ask is that classes can't access global variables. The could do so if you passed a reference to "this" in the constructor, but to do that you have to know the type.

Can you post a code example that shows your question ?
thank you

PaulMurrayCbr:
In the "global" scope, what type is the "this" function when you use the standard arduino environment?

this isn't a function. It is a pointer to the current instantiation.

... the standard arduino environment ...

This is a C++ question, not an Arduino question.

PaulMurrayCbr:
The reason I ask is that classes can't access global variables.

What? By 'classes' do you mean class static methods or do you mean objects? In both cases they should be able to access global variables.

In both cases they should be able to access global variables.

Since the sketch and the class are (usually) compiled separately, you need to tell the class (file) that the variable is defined and declared extern(ally).

If you are writing a class properly then it should never access any global variables directly. They should be passed in to the constructor or the other class methods. Object oriented programming should never use globals.

If you're just writing a .cpp file to be #included because you wanted to keep all of your LCD functions in one file, then yes you might possibly use the extern keyword to access globals from the main .ino file.