Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~980 People Reached
Favorite Forums
Favorite Tags
c++ x 24
Member Avatar for TrintiyNoe

Is there a way to use one type of iterator for another? like vector<int> iterator to vector<string> iterator,also any way iterator can be used like a interger?? coz i wanna do some mathematical manipulations on an iterator.coz i cant,i use a variable [CODE] int i;int ss=string.size() for(int i=0;i<ss;++i)[/CODE] but i …

Member Avatar for praveenraj1987
0
72
Member Avatar for TrintiyNoe

Hey, [CODE] #include<iostream> #include<sstream> using namespace std; void manage(vector <string> scoreSheet) { int i; stringstream q; string z; for(i=0;i<scoreSheet.size();i++) { q<<scoreSheet[i]; q>>z; cout<<z<<endl; } } [/CODE] I expected this program to print the first word of each string in vector but is printing the first value over and over again,any …

Member Avatar for kvprajapati
0
285
Member Avatar for TrintiyNoe

[CODE]#include<iostream> #include<vector> #include<sstream> #include<algorithm> #include<cmath> #include<string> using namespace std; class ComboLength { public: int howLong(string moves) { vector<int> cc; int i,j,k=0; for(i=0;i<moves.size()-1;++i) { if(moves[i]==moves[i+1]) //Error k++; else cc.push_back(k); } return *max_element(cc.begin(),cc.end()); } }; [/CODE] I get a segementaion error in line if (moves[i]==moves[i+1]) any idea why?

Member Avatar for Laiq Ahmed
0
117
Member Avatar for TrintiyNoe

[CODE]cin<<a;[/CODE] lets say the user enters 'i' if i have a variable i,i want its variable to be displayed or some arbitary "Invalid output" message, any way of doin this,instead of using n case statements in switch???? Is there a way for direct redirection?

Member Avatar for TrintiyNoe
0
123
Member Avatar for TrintiyNoe

can u tell me a way to remove the excess spaces from a sentance using Ws? or anyother way? Lets say i have "This is a sentance" I want "This is a sentance" with ws?

Member Avatar for Tom Gunn
0
152
Member Avatar for TrintiyNoe

Hey,i just came by an example where,a string was split off using strings, the input was something like, "342c234" basically, a string where it is full of numbers and in between a char, i used ascii values in a for loop to split them,but somebody just did some sort of …

Member Avatar for TrintiyNoe
0
106
Member Avatar for TrintiyNoe

Hey,can u ppl tell me a simple way of converting a string into a integer? I have something like [ICODE] string str1 ("1000"); string str2 ("2000"); [/ICODE] i wanna convert them into integers and add them,any idea how?

Member Avatar for TrintiyNoe
0
125