|
Post by Otis on Mar 3, 2014 13:36:59 GMT -8
I am loading different jpgs based on a variable. I've turned that variable into strings such as "1.jpg" and "2.jpg". However, when I put the strings name in GD.load(StringName), it won't compile. How can I accomplish this?
Thanks!
|
|
|
Post by jamesbowman on Mar 3, 2014 17:06:59 GMT -8
If you are using a "string" variable, then using c_str() like this is necessary:
string tmp = "1.jpg"; GD.load(tmp.c_str());
|
|
|
Post by jinteki2501 on Mar 4, 2014 21:06:15 GMT -8
While the short file names used above are fine, keep in mind that the jpg file needs to be referenced with the 8 character + 3 character extension "DOS" format filename for GD.load(). I got caught by this the other day. :-)
|
|