Is not an enclosing class Java

ZShape is not static so it requires an instance of the outer class. The simplest solution is to make ZShape and any nested class static if you can. I would also make any fields final or static final that you can as well.

Member ‘‘ cannot be accessed with an instance reference

In C#, unlike VB.NET and Java, you can’t access static members with instance syntax. You should do: to refer to that property or remove the static modifier from Property1 (which is what you probably want to do). For a conceptual idea about what static is, see my other answer.

error: strcpy was not declared in this scope

Observations: #include <cstring> should introduce std::strcpy(). using namespace std; (as written in medico.h) introduces any identifiers from std:: into the global namespace. Aside from using namespace std; being somewhat clumsy once the application grows larger (as it introduces one hell of a lot of identifiers into the global namespace), and that you should never use … Read more

align text center with android

Set also android:gravity parameter in TextView to center. For testing the effects of different layout parameters I recommend to use different background color for every element, so you can see how your layout changes with parameters like gravity, layout_gravity or others.

TreeMap sort by value

You can’t have the TreeMap itself sort on the values, since that defies the SortedMap specification: A Map that further provides a total ordering on its keys. However, using an external collection, you can always sort Map.entrySet() however you wish, either by keys, values, or even a combination(!!) of the two. Here’s a generic method … Read more