Home > Software engineering >  Want to ask you, why str6 empty string
Want to ask you, why str6 empty string

Time:11-20

CodePudding user response:

VC6 no problem

CodePudding user response:

LPCSTR said is immutable,
LPSTR represents can modify
You use immutable, cast can modify, want to do?
Starting from the fun function, estimation is not correct,
You can change the fun function prototype to
Void fun (cstrings & amp; Lpstring)
{
Cstrings STR.
STR="DGGGG";
Lpstring=STR;
}

The estimate is normal,

CodePudding user response:

Modify before add:
Str6. ReleaseBuffer ();
Have a try
  • Related