Is it possible to use only a period (.) To access namespace members and static class members

In C ++, we use double colon ( :: to access the members of the namespace, use dot ( . ) To access the members of the class / structure and use the arrow ( -> ) to access the members of the class / structure through a pointer.

Is it possible to use only a period ( . )? For instance. my_namespace.my_class.my_static_pointer.my_member . Why are separate tokens used? Will there be problems with the syntax if for all three cases only dots ( . ) Were used?

+5
source share

Source: https://habr.com/ru/post/1275651/


All Articles