I tried to use enum in followin way, but i can't compile it. In standart gcc it works. Can somebody help me? The error message "error: 'device' was not declared in this scope" really does not help.
UKHeliBob:
Can you please post a short but complete problem that illustrates the problem ?
case device::on:
Is this how you refer to an element of an enum ?
The goal is to define global function, which has one parameter as enum. If you try to paste the source code in .ino file a you compile it, you become an error.
Interresting is, that it works properly, if you are using the device enum inside a body of any function. In Functions you can in the same way declare and switch/case this enum variable.