C++

GUIでHello, World

C++

いろんなGUIライブラリで、「Hello, World」ていうタイトルのウィンドウを表示するサンプル。 環境はVista/VC2008Express。 GTK+ #include <gtk/gtk.h> #include <windows.h> int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_</windows.h></gtk/gtk.h>…

NDSでMQOビューアをつくる(2)

昨日のコードのC++版。とりあえずPC用で。 #include <stdio.h> #include <iostream> #include <string> #include <boost/xpressive/xpressive.hpp> using namespace std; int main(int argc, char *argv[]) { using namespace boost::xpressive; if (argc < 1) { return 1; } FILE *fp = fopen(argv[1], "r"); if (fp ==</boost/xpressive/xpressive.hpp></string></iostream></stdio.h>…

久しぶりにC++

C++

C++でEthnaっぽいMVCのゲームフレームワークを書き始めた。RendererをDirectX、ActionとViewをシーン処理に当てはめればいいかんじにまとまりそうな気がする。