using System;using System.IO;class FileTest { public static void Main() { StreamReader srd;string path = @"c:\temp\MyTest.txt"; ...
item 25:一个不抛异常的swap函数标准库有一个swap用于交换两个对象值namespace std{ template void swap(T& a , T& b) { T temp(a) ; a = b ; b = temp ; }}所以,只要对象的类型T支持copying(copy ct...
分类:
编程语言 时间:
2015-02-26 11:22:03
阅读次数:
162
分类:Linux使用2014-01-14 13:381449人阅读评论(0)收藏举报如何在Linux下拷贝一个目录呢?这好像是再如意不过的问题了。比如要把/home/usera拷贝到/mnt/temp,我首先想到的就是cp -R /home/usera/* /mnt/temp但是这样有一个问题,/h...
分类:
系统相关 时间:
2015-02-25 17:05:13
阅读次数:
138
先解决问题:“c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\8d57d图:其他的解决方案均没有成功如:1 设置c:windows\temp 目录访问权限 temp--> 属性-->安全-- >...
Python下的主窗口可以定义如下:def start(self): #self.project = Project("temp") #self.project.directory = os.getcwd() #Splash = SplashScreen(self.master) self.hell...
分类:
编程语言 时间:
2015-02-23 16:40:07
阅读次数:
190
3 0 1 1这组数据的答案是 2 2 3而不是 2 1 3所以代码中注释部分存在问题// hdu 1003// water// Feb.16 2015#include int T, n, a, m, sum, temp_begin, begin, end, CaseNum = 0;int main...
分类:
其他好文 时间:
2015-02-16 01:39:26
阅读次数:
130
题目链接
#include
#include
using namespace std;
int a[1100];
int main()
{
int i,n,min,temp;
while(~scanf("%d",&n))
{
min=10000000;
for(i=0;i<n;i++)
scanf("%d",&a[i]);
sort(...
分类:
其他好文 时间:
2015-02-15 18:11:19
阅读次数:
135
function CovFileDate(Fd:_FileTime):TDateTime; { 转换文件的时间格式 } var Tct:_SystemTime; Temp:_FileTime; begin FileTimeToLocalFileTime(Fd,Temp); FileTimeToSystemTime(Temp,Tct); ...
分类:
其他好文 时间:
2015-02-15 12:18:22
阅读次数:
191
http://acm.nyist.net/JudgeOnline/problem.php?pid=590
#include
int a[1010];
int main()
{
int n,m,i,j,sum,temp;
while(~scanf("%d%d",&n,&m))
{
sum=0;
for(i=0;i<n;i++)
scanf("%d",&a[i]);
...
分类:
其他好文 时间:
2015-02-15 09:29:19
阅读次数:
192
#include
//通过指针函数返回一个截完的串的地址
char *substring(char s[],int i,int j)
{
//这个临时数组必须是static,否则值传不回去
static char temp[100];
int n,m;
for(m=0,n=i;n<=j;n++,m++)
{
temp[m]=s[n];
}
temp[m]='\0';
r...
分类:
其他好文 时间:
2015-02-14 17:32:51
阅读次数:
91