namespace (三)
{
while(ifs>>word)
{
cout<
}
}
void stdread::SayHello()
{
cout<<"hello, welcome to here!"<
}
3 main.cpp
[cpp]
#include "read.h"
using namespace stdread;
int main()
{
ifstream ifs("data\\script\\fishname.txt");
string word;
ReadToger(ifs, word);
system("pause");
return 0;
}
#include "read.h"
using namespace stdread;
int main()
{
ifstream ifs("data\\script\\fishname.txt");
string word;
ReadToger(ifs, word);
system("pause");
return 0;
}
data是相对了工程目录的,用流做参数,参数要是reference