Thread: Basic file io
View Single Post
Old 04-07-2017, 05:35 PM   #11
Human being with feelings
Xenakios's Avatar
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,034

Originally Posted by ynohtna View Post
Your second call to strcpy overwrites your buffer contents (the result of GetResourcePath()) with "wdl_test_file.txt" because it's using strcpy again.

That second call should be using strcat instead. I'm sure you'll work out why if you look up the docs for strcpy & strcat.
Or just use snprintf...

char buf[4096]; // might not be enough for extreme cases but enough for most cases...
snprintf(buf,sizeof(buf),"%s/testfile.txt", GetResourcePath());
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
Xenakios is online now   Reply With Quote