c++ difference of "::" and "->"
<p>Im just curious whats the difference of <code>::</code> and <code>-&gt;</code> in c++? currently studying c++ because i want to study opengl and lots of tutorial in opengl using c++ so ill just go with language that has many tutorials :) In java or c# if you want to call a function or a reserved function you just use "." like for example <code>text1.getText()</code>; If you are to convert it to c++ would that be <code>text1-&gt;getText()</code>? and what to call them? Title is not appropriate. If <code>-&gt;</code> is equal to "." in java then whats the use of "::"? I believe there are many questions out there like mine but i dont know what to call them so i cant have an accurate information. By the way i found this <code>::</code> think while using sfml.
here is an example</p>

<pre><code>if (event.type == sf::Event::Closed)
            {
                // end the program
                running = false;
            }
            else if (event.type == sf::Event::Resized)
            {
                // adjust the viewport when the window is resized
                glViewport(0, 0, event.size.width, event.size.height);
            }

void renderingThread(sf::Window* window)
    {
        // activate the window's context
        window-&gt;setActive(true);


        // the rendering loop
        while (window-&gt;isOpen())
        {
            // draw...

            // end the current frame -- this is a rendering function 

(it requires the context to be active)
                window-&gt;display();
            }
        }
</code></pre>

<p>window uses -> while sf uses <code>::</code></p>
