#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <iostream>
usingnamespace std;
int _tmain(int argc, _TCHAR* argv[])
{
FILE * pFileIn;
FILE * pFileOut;
char lineIn[2001];
char lineOut[2001]= "z";
char * ptr1, * ptr2;
int c;
int n=0, i=0;
pFileIn = fopen ("c:\\PointsOfInterest\\readfile.txt","r");
if (pFileIn!=NULL) //if the file opened
{
do {
fgets (lineIn,2000,pFileIn); //get the next string from the file
ptr2 = strtok (lineIn,"><"); //find the sub string in the lineIn string
while (ptr2 != NULL){ //step through the string{
cout << ptr2 << endl; //print the string
ptr2 = strtok (NULL,"><"); //must send back NULL for strtok to look for next occurance
}
} while ( ! feof(pFileIn));
fclose (pFileIn);
} //end if
return 0;
}