摘要: 一、准备工作首先从 http://sourceware.org/pthreads-win32/#download下载pthreads-w32-2-9-1-release.rar,解压后得到Pre-built.2文件夹将其中的lib文件夹和include文件夹内容分别放到vs2008相应位置。将其中dll文件夹中的文件与编译生成的exe放在同一目录下(一般为vs2008工程目录的Dubug或Release目录)。二、程序编写求π值近似公式:程序源代码如下: 1 // exp1_pi.cpp : 定义控制台应用程序的入口点。 2 // 3 #include "stdafx.h" 阅读全文
posted @ 2013-05-09 15:15 Rufa 阅读(645) 评论(0) 推荐(0)
摘要: int 转 string#include "stdafx.h"#include<iostream>#include <string>#include <sstream>using namespace std;int main(){ //将int转成string int n = 123456; string s; stringstream ss; ss << n; ss >> s; cout<<s<<endl; system("pause"); return 0;}stri 阅读全文
posted @ 2013-04-28 09:12 Rufa 阅读(168) 评论(0) 推荐(0)
摘要: 首先需要安装VirtualBox的增强功能。在VirtualBox共享文件夹中设置D盘为共享,名称为D_DRIVE,勾选上固定分配和自动挂载。不知为何进入Ubuntu没能自动挂载,手工挂载命令如下: sudo mkdir /mnt/D sudo mount -t vboxsf D_DRIVE /mnt/D然后打开/mnt下的D文件夹,就能看到D盘的内容了。(备注:研究一下自动挂载的问题,再来完善,争取把这个问题彻底解决) 阅读全文
posted @ 2013-04-26 13:38 Rufa 阅读(223) 评论(0) 推荐(0)