标题:麻烦各位!
只看楼主
zhuifengyh
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-4-13
 问题点数:0 回复次数:0 
麻烦各位!

#include "iostream"
#include "fstream"
#include "cstdio"

using namespace std;

void main()
{
ifstream infile("1.txt");
ofstream outfile("data.txt");
char str[40000]={0};
char str1[30000]={0};
int i=0;
int j=1;
while(infile>>str)
{
j++;
cout<<j<<":"<<str<<endl;
if(j%2==0)
{
ifstream infile1("2.txt");
ofstream outfile1("3.txt");
}
else
{
ifstream infile1("3.txt");
ofstream outfile1("2.txt");

}
while(infile1>>str1)
{
if(strcmp(str,str1)==0)
{
infile1.close();
break;
}
else
{
outfile1<<str1<<endl;
}
if(strcmp(str1,"0000000")==0)
{
i++;
cout<<"用户数目:"<<i<<endl;
outfile<<str<<endl;
}
}

}
}

搜索更多相关主题的帖子: 麻烦 
2007-04-13 13:09



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-131566-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.443331 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved