TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BRIAN LUNERGAN
from: FREDERIK RETSEMA
date: 1998-02-15 22:21:00
subject: Request for help on string comparison...22:21:0102/15/98

Hi Brian,
This might be what you're looking for:
%include 
int iCounter;
BL>     // Loop through the source file, checking each line for the
BL>     // offending text, and writing those that pass the "filter"
BL>     // to the output working file.
BL>     while (!infile.eof())
BL>     {
BL>         infile.getline(buff, sizeof(buff));
            for (iCounter = 0; iCounter < sizeof(buff); iCounter++)
            {
                if (isalpha(buff[iCounter]) && islower(buff[iCounter]))
                {
                    buff[iCounter] = toupper(iCounter);
                }
            }
BL>         if (strstr(buff, "DESCRIPTION BY DIZMAN") == 0)
BL>             outfile << buff << endl;
BL>         else
BL>             cntr + 1;
BL>     }
BL>     infile.close();
BL>     outfile.close();
Bye,
Frederik
--- FMail 1.02/Golded 2.50B
---------------
* Origin: BBS Hello, World: 0297-534430 voor FidoNet-info ! (2:280/905.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.