D
doubts
Hi all,
I am trying to convert my bulk of code from VC++ 6.0 to VC++.Net.
when using std::string type variable, the application causes exception
at one instance and does not cause an exception at other.
i have two functions in the same .cpp file
//exception occurs at this function
void call(const char* var2 )
{
std::string var1;
( var2 == NULL ) ? var1= "itsme": var1= var2 ; //exception occurs at
this line "var1 = "itstime"
.......
.....
}
//exception does not occur at this function
void call1(const char* var2 )
{
std::string var1;
( var2 == NULL ) ? var1= "itsme": var1= var2 ;
.......
.....
}
the exception is CRT exception. There is some problem regarding
allocation which i am not able to figure out.This error happens at
several other places when i am trying to assign a value to string eg.
(string temp = " hi bye" ).
please help me reagarding this..
regards,
doubts.
I am trying to convert my bulk of code from VC++ 6.0 to VC++.Net.
when using std::string type variable, the application causes exception
at one instance and does not cause an exception at other.
i have two functions in the same .cpp file
//exception occurs at this function
void call(const char* var2 )
{
std::string var1;
( var2 == NULL ) ? var1= "itsme": var1= var2 ; //exception occurs at
this line "var1 = "itstime"
.......
.....
}
//exception does not occur at this function
void call1(const char* var2 )
{
std::string var1;
( var2 == NULL ) ? var1= "itsme": var1= var2 ;
.......
.....
}
the exception is CRT exception. There is some problem regarding
allocation which i am not able to figure out.This error happens at
several other places when i am trying to assign a value to string eg.
(string temp = " hi bye" ).
please help me reagarding this..
regards,
doubts.