Warp wrote:
>
> This code causes it. Can you see what is the mistake?
>
> #include <string>
> using namespace std;
>
> int main()
> {
> string x();
This line doesn't define a variable of type string but a function with
no arguments that return a string and whose code is assumed to be given
elsewhere (except that I'm surprised that this works inside another
function, I would have understood better if "string x();" was before
"int main()").
> x.clear();
But this should work: "x().clear();" (assuming you've got the function
x defined elsewhere). Hey, I wasn't that far off! :))
> }
>
--
* Doctor Jekyll had something * mailto:ber### [at] iname com
* to Hyde... * http://www.enst.fr/~jberger
*******************************
Post a reply to this message
|