|
Buffer overrun along the horizon.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
absolutely, but i only meant to identify the problem a lil more clearly
|
|
|
|
|
|
T.RATHA KRISHNAN wrote: I followed the same method. But the following code:
Nope. You got it wrongly.
T.RATHA KRISHNAN wrote: std::string path = dtCore::GetDeltaRootPath();
const char* exeroot = path.c_str();
strcat(path,"/");
strcat(path,"CharacterAnimation.exe");
result = system(path);
return true;
change to
std::string path = dtCore::GetDeltaRootPath();
path +="/";
path +="CharacterAnimation.exe";
result = system(path.c_str());
return true;
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks a lot. I resolved the errors. But now my problem is: the variable path contains "Program Files". Compiler takes only Program leaving the space and after that. So the console displays an error: "C:\Program" is not recognized as an internal or external command,operable program or batch file. What to do?
|
|
|
|
|
F*CK, you don't listen to me.
if you were using ShellExecute, that wouldn't have happened.
use quotes ( " " ) around your string (within the string I mean), or use ShellExecute
|
|
|
|
|
I don't understand this:(with in the string). My string definition is:
path += "/";
path += "CharacterAnimation.exe";
result = system(path.c_str());
Where should I put double quotes?
|
|
|
|
|
god, do you understand this : use ShellExecute ?????
::ShellExecuteA(NULL, "open", path.c_str(), NULL, NULL, SW_NORMAL);
|
|
|
|
|
Regards,
Sandip.
|
|
|
|
|
Thanks. It's working now.
|
|
|
|
|
T.RATHA KRISHNAN wrote: Thanks. It's working now
at last... glad to hear that
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You dont like ShellExecute(), do you??
within string means something like this
path += "\""; in the beginning and end also.
BTW if you have followed toxcct and used ShellExecute() there would not have be so much waste of your time.
Regards,
Sandip.
|
|
|
|
|
Relax dude
don't get so much angry
Regards,
Sandip.
|
|
|
|
|
Whenever you have a path containing spaces, you need to (double)quote the it, i.e.
path = "\"" + path + "\"";
system( path.c_str());
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
modified on Tuesday, July 1, 2008 9:06 AM
|
|
|
|
|
system() is deprecated.
moreover, i think we really should avoid to mention it anymore with this *ù"'#
ShellExecute() for ever ! lol
|
|
|
|
|
toxcct wrote: system() is deprecated.
And portable.
BTW strcat without enough storage is more than deprecate
(just kidding)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
absolutely, but that guy is coding like a pig...
|
|
|
|
|
Well, we, as teachers, are commited to do the miracle and transform him into a top-skilled-developer (brass band needed here).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
21 posts? Soooooooooo ambitious!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Let's just hope they're not 21 George_George posts
|
|
|
|
|
What a breath of fresh air, some sanity at last.
Steve
|
|
|
|
|
Thanks.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
And why was this voted down? I'll add my 5 on this.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Visual C++ MVP
|
|
|
|