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
~295 People Reached
Favorite Forums
Favorite Tags
c++ x 3
Member Avatar for banbangou

Anybody can help to explain why "m_line.replace(idx, m_search.size(), replace);" doesn't compile in cygwin and how to change it? Thanks. [code] using namespace std; int main(int argc, char *argv[]) { assert(argc==3 && "Usage: <searchstring> replacestring> to process stdin"); string m_line; string m_search(argv[1]); string m_replace(argv[2]); assert(m_search!=m_replace); while(getline(cin, m_line)) { while(true) { string::size_type …

Member Avatar for banbangou
0
119
Member Avatar for banbangou

Anybody could tell me what's wrong with the following code? It complaints: 13 C:\apps\Dev-Cpp\projects\14\14_1.cpp ISO C++ forbids defining types within return type Thanks in advance. [code]#include <iostream> #include <cstdlib> using namespace std; struct vector { double x; double y; friend ostream& operator<< (ostream&, vector); } ostream& operator<< (ostream& o, vector …

Member Avatar for quickhelp
0
176