Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: std::string to char* Pin
Rajesh R Subramanian4-Jul-08 0:30
professionalRajesh R Subramanian4-Jul-08 0:30 
GeneralRe: std::string to char* Pin
CPallini4-Jul-08 0:49
mveCPallini4-Jul-08 0:49 
GeneralRe: std::string to char* Pin
Rajesh R Subramanian4-Jul-08 1:27
professionalRajesh R Subramanian4-Jul-08 1:27 
GeneralOr Maybe Pin
CPallini4-Jul-08 1:59
mveCPallini4-Jul-08 1:59 
GeneralRe: std::string to char* Pin
CPallini4-Jul-08 6:50
mveCPallini4-Jul-08 6:50 
GeneralRe: std::string to char* Pin
Rajesh R Subramanian5-Jul-08 20:32
professionalRajesh R Subramanian5-Jul-08 20:32 
JokeRe: std::string to char* Pin
CPallini6-Jul-08 0:03
mveCPallini6-Jul-08 0:03 
GeneralRe: std::string to char* Pin
Stephen Hewitt1-Jul-08 14:25
Stephen Hewitt1-Jul-08 14:25 
Why in hell's name are you using strcat? This doesn't make any sense on so many levels. strcat is a low level function whereas std::string is a high level class that's intended to manage to low level details for you. Even is the code compiled, the intention is flawed anyway: you have no right to mess with a std::string's buffer. That's the reason why the buffer returned from the std::string::c_str method is const. Use code like this:
std::string path = dtCore::GetDeltaRootPath();
path += "/CharacterAnimation.exe";
system(path.c_str());


Why's exeroot used for? I can't see it being used in your code. Also note that the buffer returned from std::string::c_str is not valid if you modify the string.

Steve

GeneralRe: std::string to char* Pin
Stephen Hewitt1-Jul-08 14:39
Stephen Hewitt1-Jul-08 14:39 
Questiondialog color Pin
projectip1-Jul-08 1:42
projectip1-Jul-08 1:42 
AnswerRe: dialog color Pin
KarstenK1-Jul-08 2:52
mveKarstenK1-Jul-08 2:52 
AnswerRe: dialog color Pin
Hamid_RT1-Jul-08 20:33
Hamid_RT1-Jul-08 20:33 
QuestionResizing Static Text control Pin
VCProgrammer1-Jul-08 1:08
VCProgrammer1-Jul-08 1:08 
AnswerRe: Resizing Static Text control [modified] Pin
leonigah1-Jul-08 1:51
leonigah1-Jul-08 1:51 
GeneralRe: Resizing Static Text control Pin
VCProgrammer1-Jul-08 1:58
VCProgrammer1-Jul-08 1:58 
GeneralRe: Resizing Static Text control Pin
leonigah1-Jul-08 2:12
leonigah1-Jul-08 2:12 
GeneralRe: Resizing Static Text control Pin
VCProgrammer1-Jul-08 2:20
VCProgrammer1-Jul-08 2:20 
GeneralRe: Resizing Static Text control Pin
savita_Bgm2-May-11 20:53
savita_Bgm2-May-11 20:53 
GeneralRe: Resizing Static Text control Pin
hafizmwasim31-May-11 21:42
hafizmwasim31-May-11 21:42 
QuestionAPI for Formatting NTFS volume Pin
Anorexic Tribble1-Jul-08 1:05
Anorexic Tribble1-Jul-08 1:05 
QuestionSystem Command: Pin
T.RATHA KRISHNAN30-Jun-08 22:41
T.RATHA KRISHNAN30-Jun-08 22:41 
AnswerRe: System Command: Pin
SandipG 30-Jun-08 22:46
SandipG 30-Jun-08 22:46 
GeneralRe: System Command: Pin
T.RATHA KRISHNAN30-Jun-08 23:01
T.RATHA KRISHNAN30-Jun-08 23:01 
GeneralRe: System Command: Pin
toxcct30-Jun-08 23:08
toxcct30-Jun-08 23:08 
GeneralRe: System Command: Pin
SandipG 30-Jun-08 23:08
SandipG 30-Jun-08 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.