[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Converting char * into the string?
From: |
Kevin Peterson |
Subject: |
Converting char * into the string? |
Date: |
Fri, 12 Apr 2013 06:03:39 +0000 |
Hi,
I have a function which takes string as an argument, but while calling this
function I am actually passing char * (not const char *). This function uses
the argument and populate the private variable which is of string type.
In the product its showing some strange behaviour i.e. crashing once in a while
(not always) in other function while accessing the string variable which is
class variable. Just want to check if the issue is with the passing of the
variable which is of char * type.
void myfunc(char * Id)
{
abc.fetchInfo(Id);
...
...
}
Definition of the fetchInfo
fetchInfo(std::string Id);
Thanks,
Kevin Peterson
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Converting char * into the string?,
Kevin Peterson <=