When I started to learn the SFML library I encountered a lot of usage of the scope operator particularly with sf.That's when I thought that's a namespace.After adding namespace sf there were two scopes left and they can't be removed because it will give a compilation error.And neither is a namespace.
My questions are.
Why do we need to use the scope operator if we are not using a namespace,isn't it used for accessing global variables and class functions for definitons?
And why is there a scope in front of Color and Event in the folowing program,and why do i need to use the scope operator for them?
usingnamespace sf; isn't sufficient to see Color::Green or Event::Closed.
You can think of it like nests. The true nesting is sf::Color::Green and sf::Event::Closed. usingnamespace sf; only peels off sf.
I do remember seeing enum used with scope,which is also one of my first times seeing this in practice.
as for the static part I don't know how it works can you reccomend a page to read about it?
And if there is static is there a Heap keyword?
And yes I know that using namespace is bad but from what I gather it's for big projects.
And for now I don't think I'll be getting anywhere near to big projects.
Still thank you I really appreciate it.
If you're saying that this is a habbit of mine.I don't think so.Though it could be me and I did say that i haven't been in big projects nor would I get close to them.
Perhaps I need to be in a big project in order to see if this is a habbit or not.
Still I don't think I'm good enough or ready for a big project as I don't even know what static,recursion is and probably more.
I am thankful that you're trying to help me.
But I'm very slow and that's why I think that I won't be any big projects soon.