C艹
初学Cplusplus
dai__liang
这个作者很懒,什么都没留下…
展开
-
SFML从入门到放弃(一)
Handling time(时间的处理)时间的转换sf::Time t1 = sf::microseconds(10000);sf::Time t2 = sf::milliseconds(10);sf::Time t3 = sf::seconds(0.01f);sf::Int64 usec = t1.asMicroseconds();sf::Int32 msec = t2.asMilliseconds();float sec = t3.asSeconds();时间的运算sf:原创 2020-12-21 23:38:43 · 1260 阅读 · 0 评论 -
simpleNES与SFML入门初步(一)
simpleNES需要安装SFML库(ubuntu下,Linux上安装软件最好使用国内镜像源(阿里云等),这样下载安装会快很多)sudo apt-get install libsfml-dev从github下载到本地git clone https://github.com/amhndu/SimpleNES后按照README.MD操作注意:./SimpleNES ~/Games/SuperMarioBros.nes中的nes资源需要从nes资源网站自行下载。simpleNES中使用的sf命名空间原创 2020-12-16 22:51:17 · 2612 阅读 · 2 评论 -
理解C语言函数声明:复杂指针解析之右左法则
简介The right-left rule: Start reading the declaration from the innermost parentheses, go right, and then go left. When you encounter parentheses, the direction should be reversed. Once everything in the parentheses has been parsed, jump out of it. Continue原创 2020-12-04 16:54:49 · 165 阅读 · 0 评论 -
最小覆盖子串
string minWindow(string s, string t) {unordered_map<char, int> need, window;for (char c : t) need[c]++;int left = 0, right = 0;int valid = 0;// 记录最小覆盖子串的起始索引及长度int start = 0, len = INT_MAX;while (right < s.size()) { // c 是将移入窗口的字符 c原创 2020-12-02 23:15:27 · 179 阅读 · 0 评论