Underground - Bhasker V K,the Sandman's Hideout

Thanks for dropping in...I got this running since i needed a place to post info that i found interesting which,i could access online .lotta stuff here might find a few glances ...so make ur self @ home...and hope u find the links/info ur looking for or atleast giv u a hint 'what you should ' be looking for .
Keep Clicking,
Bhasker V K
VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: [1] ]
Subject: more c++


Author:
bhasker
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 03:34:02 09/04/03 Thu
Author Host/IP: NoHost/202.131.132.148

#include
#include
#include
#include
void newword(int pos);
void report(int reportdata);
int wordcount=0;
int pos1,pos2,posflag;
void main()
{
char word[250],tempword[250],sepword[250];

int ctr1,ctr2;
int spacepos[50];
clrscr();
cin.getline(word,10,'\n');

// finding spaces,position of spaces.. No: of spaces=no of words
for(ctr1=0,ctr2=0;ctr1 {
//tempword[ctr1]=tempword[ctr1]+word[ctr1];
// cout< if(word[ctr1]==' ')
{
spacepos[ctr2]=ctr1;
ctr2++;
newword(spacepos[ctr2]);
}
}
cout<<" wordcount is "< for(ctr1=0;ctr1 {
cout< }

for(ctr1=0,ctr2=1;ctr1 {
for(posflag=1,pos1=spacepos[ctr1],pos2=spacepos[ctr2];posflag==1;)
{
cout<<"pos 1 is "< if(pos1<=pos2)
{
cout<
if(pos1==pos2)
{
pos2=spacepos[ctr2+1];
}
if((ctr1==strlen(word)) || ( pos1>pos2))
{
posflag=0;
}
}
pos1++;
}
}
// }
getch();
}
//return(0);


void newword(int pos)
{
wordcount++;
cout<<"new word at "< report(wordcount);
}

void report(int reportdata)
{
cout<<".Number of words are "< }

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Replies:
[> Subject: Re: more c++


Author:
b
[Edit]

Date Posted: 03:35:38 09/04/03 Thu
Author Host/IP: NoHost/202.131.132.148

#include
#include
#include
#include
#include
void main()
{
char ch;
char buff[100];
cout<<"1.input 2.output 3.exit";
cin>>ch;
switch(ch)
{ //start case
case 1:
ofstream fileout("Inputtext.txt");
cin>>buff;
while(strcmp(buff,"\n")!=0)
{
fileout< cin>>buff;
}
fileout.close();
break;
case 2:
ifstream filein("Inputtext.txt");
for(;;)
{
fin>>buff;
ifstream fileout("Outputtext.txt");
if(strcmp(buff,NULL)!==0)
{
key>>skey;
fileout>>sop;
if (strcmp(buff,NULL)==0)
{
cout<<"Keyword : "< break;
}
else if(srtrcmp(buff,sop)==0)
{
cout<<"operator : "< break;
}
if ( (strcmp(skey,NULL)==0 && (strcmp(sop,NULL)==0 )
{
cout<<"identifier : "< break;
}
} //end for
filein.close();
fileout.close();
//}
//else
//break;
//}
case 3:
exit(0);
} //end switch
} //end main


[ Contact Forum Admin ]

"
"
Forum timezone: GMT-8
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.
if u want to post ,send an email to bosky101@indiatimes.com ..this is to maintain the integrity of this forum ..cheers
Keep Clicking,
bosky101 Click here to listen to my music station