C++の::
との違いは何ですか?->
OpenGLとC++を使用したopenGLの多くのチュートリアルを勉強したいので、現在C++を勉強しているので、多くのチュートリアルがある言語を使います:)
java
またはC#
、関数または予約済み関数を呼び出したい場合は、「。」を使用します。例のようにtext1.getText()
; あなたがそれを変換するC++
なら、それはtext1->getText()
? そして、それらを何と呼びますか?タイトルが適切ではありません。->
が "." に等しい場合 java
それでは、「::」の使用は何ですか? 私のような質問がたくさんあると思いますが、それらを何と呼んだらよいか分からないので、正確な情報を得ることができません。ちなみに、::
sfmlを使っていてこんなことを思いつきました。
ここに例があります
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->setActive(true);
// the rendering loop
while (window->isOpen())
{
// draw...
// end the current frame -- this is a rendering function
(it requires the context to be active)
window->display();
}
}
window uses -> while sf uses::