just exactly what it says. you cannot use a variable from a class that is not public access unless you have special permissions (eg inheritance).
if you want to directly access 'data' then make it public. You can also provide methods that get or set the variable.
Here main() is not allowed to access the protected member data of SomeClass and also SomeFunc() is not allowed to access the protected member data of SomeClass.
Here main() is not allowed to access the protected member data of SomeClass and also SomeFunc() is not allowed to access the protected member data of SomeClass.
Exactly.
That's what you told the compiler when you declared data as protected:.
Either change the visibility of data to public: or do what @jonnin suggested.