摘要: int load(char * filaName , char *& buffer){ FILE *file; if((file = fopen("D://a.txt","r")) == NULL) { printf("cant open file!"); } fseek (file, 0, SEEK_END); // non-portable char *c = ""; int size=ftell (file); rewind (file); buffer = new char[size+1]; *(b 阅读全文
posted @ 2013-03-26 23:04 fff8965 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 读文件到文件尾 FILE *file; if((file = fopen("D://a.txt","r")) == NULL) { printf("cant open file!"); } char ch; while((ch = fgetc(file))!=EOF) putchar(ch); if(fclose(file)) printf("file close error!");从键盘输入字符存入文件 FILE *file; if((file = fopen("D://a.txt",&quo 阅读全文
posted @ 2013-03-26 22:52 fff8965 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 绑定元素的大小一般会想到Width和Height但是wpf里的Width和Height如果没有显示的设置过大小那么得到的就是NaN要动态得到元素的大小要用ActualWidth、ActualHeight<UserControl x:Class="园区展示程序.MyRichTextBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" . 阅读全文
posted @ 2013-03-26 15:30 fff8965 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 在wpf和C#中Environment.TickCount可以用来获得系统开机到现在的毫秒数 阅读全文
posted @ 2013-03-26 15:27 fff8965 阅读(488) 评论(0) 推荐(0) 编辑