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: c++


Author:
bhasker
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 03:32:35 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 ]


[ 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