Category : C Source Code
Archive   : GCOBJECT.ZIP
Filename : TESTGC.CPP

 
Output of file : TESTGC.CPP contained in archive : GCOBJECT.ZIP
#include "gcstring.hpp"
#include
//#define __TURBOC__
main(int argc, char ** argv)
{
if(argc != 2)
{
cout << "Usage: " << argv[0] << " filename";
exit(-1);
}
cout << farcoreleft() << "\n";
gcstring::Initialize();
gcstring s;
//#ifdef __ZTC__
// filebuf fb;
// fb.open(argv[1], input);
//istream from(&fb);
//#else ifdef __TURBOC__
ifstream from(argv[1]);
//#endif
if(!from.good())
{
cout << "Cannot find, open or use file " << argv[1];
exit(-2);
}
time_t t1 = time(NULL);
while(from.good())
{
gcstring s1, s2;
from >> s1;
from >> s2;
s = s1 + gcstring(" ") + s2 + gcstring("EOS");
cout << s << "\n";
}
time_t t2 = time(NULL);
cout << farcoreleft();
cout << "\nElapsed time is " << t2 - t1 << " sec";
}



  3 Responses to “Category : C Source Code
Archive   : GCOBJECT.ZIP
Filename : TESTGC.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/