HelloWorld 善戰(zhàn)者,求之于勢,不責(zé)于人;故能擇人而任勢。

          知止而后有定,定而后能靜,靜而后能安,安而后能慮,慮而后能得。物有本末,事有終始。知所先后,則近道矣。

            BlogJava :: 首頁 ::  :: 聯(lián)系 ::  :: 管理 ::
            167 隨筆 :: 1 文章 :: 40 評論 :: 0 Trackbacks

          #include <iostream.h>
          #include <cstdlib>
          #include <fstream> 
          #include <stdio.h>
          using namespace std;

          int main(int argc, char *argv[])
          {
              char* str = "e:/test/nihao.txt";
              FILE *t = fopen(str,"wb+");
              char tbuf[10]={0};
              fwrite(tbuf,1,100,t);
              fclose(t);
              system("PAUSE");
              return EXIT_SUCCESS;
          }



          FILE *tIn = fopen(szStr,"rb");
              if (tIn == NULL) {
                 cout<<"文件不能打開!";
                 return NULL;
              }
              fseek(tIn, 0, SEEK_END);
              int tSize = ftell(tIn);
              fseek(tIn, 0, SEEK_SET);
              char *tBuf = new  char[tSize];
              fread(tBuf,tSize,1,tIn);
              fclose(tIn);

          </script>

          posted on 2007-11-02 16:15 helloworld2008 閱讀(1479) 評論(0)  編輯  收藏 所屬分類: Linux/C
          主站蜘蛛池模板: 肇州县| 潞西市| 安新县| 阜宁县| 葵青区| 疏附县| 郸城县| 抚顺市| 罗平县| 左贡县| 民权县| 巨鹿县| 通化县| 手机| 泗水县| 新田县| 通许县| 永泰县| 五大连池市| 天峻县| 安国市| 南部县| 蕲春县| 万年县| 邢台市| 息烽县| 光泽县| 马鞍山市| 新闻| 浠水县| 武安市| 叶城县| 庐江县| 湟中县| 邳州市| 阳原县| 北票市| 政和县| 长寿区| 孟连| 盐源县|