【发布时间】:2016-07-10 18:44:51
【问题描述】:
#include<SFML/Graphics.hpp>
#include<iostream>
int main() {
sf::RenderWindow Window;
Window.create(sf::VideoMode(800, 600), "Game Engine");
sf::Time time = sf::seconds(2);
std::cout << time.asSeconds << std::endl;
while (Window.isOpen()) {
sf::Event Event;
while (Window.pollEvent(Event)) {
if (Event.type == sf::Event::Closed) {
Window.close();
}
Window.display();
}
{
}
}
}
1>----- 构建开始:项目:SFML-2.0,配置:调试 Win32 ------ 1> 主.cpp 1>c:\users\paribeshpc\documents\visual studio 2015\projects\sfml-2.0\sfml-2.0\main.cpp(11): 错误 C3867: 'sf::Time::asSeconds': 非标准语法;使用 '&' 创建指向成员的指针 ========== 构建:0 成功,1 失败,0 最新,0 跳过 ==========
请帮助我,我不断收到此错误。我正在从这个到期中学习 sfml,我从他那里复制了这段代码,但它不起作用。 The link to the video
【问题讨论】:
-
time.asSeconds()?