Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #4K
~4K People Reached
Favorite Forums
Favorite Tags
c++ x 5
Member Avatar for hinduengg

the below will reverse your sentence it works. [CODE]#include<iostream> using namespace std; int main(){ char a[100]; char b[10][20]; int x,m = 0,p,wrd = 0, i = 0; cout<<"Enter a sentence"<<endl; gets(a); for(x=0; a[x] != '\0'; x++) { if(a[x] == ' ') { for(p=m;p <= x;p++) b[wrd][i++] = a[p]; b[wrd][i] = …

Member Avatar for Narue
0
3K
Member Avatar for pengwn

I am unable to get the "is" I keep getting the below: [B] the find : this the find : this [/B] what I want is: [B] the find : this the find : is [/B] from the below code: [code] typedef multimap<int,string> IntStringMMap; IntStringMMap coll; // container for int/string …

Member Avatar for iamthwee
0
667
Member Avatar for pengwn

The code below gives : Data is : hello srikanth its me Data is : Data is : Data is : [code]#include <string> #include <iostream> #include <boost/regex.hpp> boost::regex e("(\\w)\\s*(\\w)\\s*(\\w)"); boost::match_results<std::string::const_iterator> what; int main() { int i; const std::string input = "hello srikanth its me"; boost::regex_match(input, what, e, boost::match_default | boost::match_partial); …

0
66
Member Avatar for pengwn

Can someone help me out code using the below to get the equivalent program as beneath: [B] boost::match_results<std::string::const_iterator> what; boost::regex_match(input, what, e, boost::match_default | boost::match_partial)) [/B][COLOR=#0000ff] [/COLOR][code]#include <iostream> #include <string> #include <boost/regex.hpp> int main() { std::string s = "who, lives:in-a, pineapple under the sea?"; boost::regex re(",|:|-|\\s+"); boost::sregex_token_iterator p(s.begin(), s.end(), re, …

0
78