上一页 1 2 3 4 5 6 7 8 ··· 21 下一页
#ifndef _STUDENT_H_#define _STUDENT_H_#include #include #include class Student : private std::string, private std::valarray{private: typedef std::valarray ArrayDb; //private method for scores output std::ostream & arr_out(std::ostream & os) const;public: Student() ... Read More
posted @ 2013-10-17 17:14 瓶哥 Views(348) Comments(0) Diggs(0) Edit
#ifndef _STUDENT_H_#define _STUDENT_H_#include #include #include class Student{private: typedef std::valarray ArrayDb; std::string name; //contained object ArrayDb scores; //contained object //private method for scores output std::ostream & arr_out(std::ostream & os) const;publi... Read More
posted @ 2013-10-17 16:03 瓶哥 Views(445) Comments(0) Diggs(0) Edit
// Name: minimal.cpp// Purpose: Minimal wxWidgets sample// Author: Julian Smart#include "wx/wx.h"// Declare the application class//定义应用程序类class MyApp : public wxApp{public: // Called on application startup //这个函数将会在程序启动的时候被调用 virtual bool OnInit();};// Declare our main frame... Read More
posted @ 2013-10-13 22:12 瓶哥 Views(981) Comments(0) Diggs(0) Edit
#ifndef _ACCTABC_H_#define _ACCTABC_H_//(*#include #include //*)//Abstract Base Classclass AcctABC{private: std::string fullName; long acctNum; double balance;protected: struct Formatting { std::ios_base::fmtflags flag; std::streamsize pr; }; const std::string & Fu... Read More
posted @ 2013-10-11 17:01 瓶哥 Views(427) Comments(0) Diggs(0) Edit
#ifndef _BRASS_H_#define _BRASS_H_#include //Brass Account Classclass Brass{private: std::string fullName; long acctNum; double balance;public: Brass(const std::string & s = "Nullbody", long an = -1, double bal = 0.0); void Deposit(double amt); virtual void Withdraw(double amt); ... Read More
posted @ 2013-10-11 16:59 瓶哥 Views(381) Comments(0) Diggs(0) Edit
本文摘自http://www.cnzui.com/?p=962在原文的基础上根据自己的实践做了一些修改我的IDE为C::B 12.11,wxWidgets版本为wxWidgets-2.8.12在上一篇文章中我们已经编译好了wxWidgets-2.8.12的四个版本的库编译好的库文件在wxWidgets-2.8.12\lib里面,动态库为gcc_dll,静态库为gcc_lib,调试版和发行版的区别在于文件名中调试版比发行版多了一个字母:d一、使用静态库开发wxWidgets程序首先选择MINGW做为默认编译器,然后再打开“Settings”->“Global Variables…”,在设置 Read More
posted @ 2013-10-09 16:36 瓶哥 Views(3636) Comments(0) Diggs(0) Edit
教程摘自网上各大博客、贴吧、论坛,结合自己的实践做了一些实质性的修改。一、安装首先从http://sourceforge.net/projects/wxwindows/files/2.8.12/wxMSW-2.8.12-Setup.exe/download上下载wxWidgets2.8.12。建议将其安装某个驱动器的根目录下,比如:E:\ wxWidgets-2.8.12 目录下(尾部数字以您所使用的wxWidgets版本为准)。二、编译上一步安装wxWidgets,仅得到源代码文件及一些说明。我们还需要将其中的源代码编译成“库”文件。今天我们将把wxWidgets编译译成四种形式:动态链接库 Read More
posted @ 2013-10-09 16:03 瓶哥 Views(1272) Comments(0) Diggs(2) Edit
最近在学C++,这个是照葫芦画瓢的五子棋C++版- -依赖SDL_PingGe_1.3,很多实用的函数,类我都封装成DLL了调用起来真是舒服啊。。不过一方面要对DLL做测试,一方面要开发,一个人还真是累啊。按钮我也取消了,毕竟只是花架子,比C版多了一个开场动画,鼠标也被修改成了一只小手,还有分出胜负后五子将会被一条红线连接(这方面的数据交互没做好)AI部分做了些修改,细化了计分表,总体水平强了不少,但是同学说缺少攻击性,哈哈没办法啦,暂时不去优化了。其实还有一个小BUG。。但是我很懒,也没那么多时间去仔细检查AI部分了,留给大家吧BUG:当中间部位还差一子便可连成五子时,AI本应是最优先落中间 Read More
posted @ 2013-10-06 22:44 瓶哥 Views(1128) Comments(0) Diggs(0) Edit
人生第一个图形界面程序,拉出来纪念纪念- -数据共享上基本上全是全局变量,也没有任何FPS限制。。当然没有图片你也是运行不了的,就当作参考吧,AI部分很简单的按照一个计分表来算分//SDL头文件#include #include #include #include #include "SDL/SDL.h"#include "SDL/SDL_image.h"#include "SDL/SDL_ttf.h"#include "SDL/SDL_mixer.h"//#program comment(lib,"SD Read More
posted @ 2013-10-06 22:27 瓶哥 Views(333) Comments(0) Diggs(0) Edit
这篇随笔专门做SDL的DLL开发。下面这个版本暂且称为Beta版本吧。/* typedef void (*FUNCTION)(void); HMODULE HDll; HDll = LoadLibrary("SDL_PingGe.dll"); if(HDll == NULL) { printf("Load library failed!\n"); FreeLibrary(HDll); return 0; } FUNCTION fun = FUNCTION(GetProcAddress(HDll,MAKEINTR... Read More
posted @ 2013-10-06 22:18 瓶哥 Views(291) Comments(0) Diggs(0) Edit
上一页 1 2 3 4 5 6 7 8 ··· 21 下一页