- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: 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] = … | |
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 … | |
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); … | |
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, … |