Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1063261
  • 博文数量: 284
  • 博客积分: 8223
  • 博客等级: 中将
  • 技术积分: 3188
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-01 13:26
文章分类

全部博文(284)

文章存档

2012年(18)

2011年(33)

2010年(83)

2009年(147)

2008年(3)

分类: C/C++

2009-07-27 16:30:11

#include
#include

using namespace std;

int main(int argc,char **argv[])
{
#ifdef __cplusplus
   cout << "this is cpp\n";
#endif
   cout << "this file is complied : " << __TIME__ << " " << __DATE__;
   string s1("11");
   ifstream infile(s1.c_str(), ios::in);
   if(!infile) exit(1);
   string text;
   while(getline(infile, text,'\n')){
      cout << "read:"<< text <<"\n";
   }
   return 0;
}

makefile:

all : clean tt
.PHONY : all
clean :
 -rm *.o tt core
tt : test.o
 CC -o t test.o
test.o : test.c
 CC -c test.c

阅读(1144) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~