On Sun, Feb 14, 2010 at 12:59 PM, Tony Rick <[email protected]> wrote:

>
>
> On Sun, Feb 14, 2010 at 10:46 AM, Carlos Konstanski <
> [email protected]> wrote:
>
> What is the error message from Visual C++?
>
> What is the value of rawInput in the g++ version after the call returns?
>
> - tony
>

So I wrote a test program, using your function and g++:

#include <string>
#include <iostream>
#include <stdio.h>

int main(int argc, char **argv) {

    string rawInput("1234567");
    cout << rawInput << endl;
    printf ("%s\n", rawInput.c_str());
    bool rslt = numericP(rawInput);
    cout << rawInput << endl;
}


Of course,  I have no idea what your calling code looks like, so I went
minimal.  As you said,  g++ likes it just fine, and rawInput is intact upon
return.

Please give us a code example of what you mean when you say 'But later
attempts to use the value that I passed in as rawInput'.

- tony
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to