But I don't understand the difference between the two lines below, could you please tell a little bit more. I was considering that the second one is ever sufficient.
You can have more than one getBarraRolagem() function belonging to different classes and namespaces so there is no way the compiler can know that you actually mean the one in the DadosBarraRolagem class if you don't say so explicitly.
How is the compiler (or anyone else) supposed to know it's a member function of DadosBarraRolagem if you don't say so?
You did it for the constructor too, same thing.
The first line indicates that getBarraRolagem() resides within the scope of DadosBarraRolagem. The second line indicates that getBarraRolagem() resides within the global namespace.
In addition, I would like to say that there is only one getBarraRolagem() at all. For this reason, I was expecting compiler could discover that it belongs to DadosBarraRolagem.