🔒 Locked
fopen
Advertisement
Original Post
One thing people easily forget is double quotes being automatically added by Windows, in some cases.
If your program gets the file name via command line or drag & drop, or maybe via the common dialog, likely it will be bounded with "" that you need to stripe before using fopen(). Double quotes, however, are only added when the file name would be unclear, without.
It's just a guess, without any more details I can't think of anything else ^^
If your program gets the file name via command line or drag & drop, or maybe via the common dialog, likely it will be bounded with "" that you need to stripe before using fopen(). Double quotes, however, are only added when the file name would be unclear, without.
It's just a guess, without any more details I can't think of anything else ^^
Quote:
One thing people easily forget is double quotes being automatically added by Windows, in some cases.
If your program gets the file name via command line or drag & drop, or maybe via the common dialog, likely it will be bounded with "" that you need to stripe before using fopen(). Double quotes, however, are only added when the file name would be unclear, without.
It's just a guess, without any more details I can't think of anything else ^^
Not the problem, but you sent me in the right direction. Many thanks.
The problem is that I am failing to strip off the last " in parsing my file.
If I have a line such as:
#include "myfile.as" // include the file we need
I want myfile.as
Currently I am using this:
newScript = newScript.substr(newScript.find_first_of("\"")+1,newScript.find_last_of("\"")-1);
where newScript would hold #include "myfile.as" // include the file we need
This is failing to strip off the last ". Is there an obvious reason why?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement