Re: [Dev-C++] function name conflict
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: DC A <ad...@ho...> - 2007-03-08 13:24:27
|
Britsch, Matthias wrote:
>I have never seen such a use of the string constructor.
>Try string a = x; and string b = y; instead. (You have declared x and y
>already in the function header).
>
>
Thanks for your reply. okay I changed the plus function Now it looks like
this:
string plus(string x, string y)
{
string a = x;
string b = y;
string c = a + b;
return c;
}
But still getting the error:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h:
In function int main():
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h:134:
error: template<class _Tp> struct std::plus is not a function,
test.cc:7: error: conflict with std::string plus(std::string,
std::string)
test.cc:21: error: in call to plus
_________________________________________________________________
Your Space. Your Friends. Your Stories. Share your world with Windows Live
Spaces. http://spaces.live.com/?mkt=en-ca
|