-
SFML / 텍스트그리기(폰트)
활동 기록 😵💫/SFML 테트리스 2023. 1. 19. 20:15#include #include #include int main(void) { sf::RenderWindow window(sf::VideoMode(400, 300), "SFML window"); // main window 생성 sf::Font font; if (!font.loadFromFile(R"(C:\Users\sssan\Library\Fonts\NanumFont\NanumGothic.ttf)")) throw std::exception("font error"); // 쓸 폰트 생성 sf::Text text("유선 hi", font, 50); text.setFillColor(sf::Color::Green); //글씨 색깔 //화면에 쓸 내용 while (window.isOpen()) //윈도우 루프 {..
-
JAVA / 재귀함수
프로그래밍 언어 😵💫/Java 2023. 1. 19. 00:38public class PlusFunction { public static void main(String[] args) { HelloWorld(5); // HelloWorld 출력 메서드 호출 } // HelloWorld 출력 메서드 선언 public static void HelloWorld(int n) { // n이 0인 경우 return if(n == 0) return; System.out.println("HelloWorld"); // HelloWorld 출력 HelloWorld(n-1); // 재귀함수 시작 } }