replacing characters in C++[SOLVED]
i have a system to load files in a directory using boost however it loads them like this,
Graphics\Icons\file.png
I need them to be
Graphics/Icons/file.png
to load correctly, what would be the best way to do this?
[Edited by - namingway on June 22, 2008 8:15:47 AM]
windows xp, after looking at it somemore it seems to be here where it changes
for (int i = 0; i < _iconFiles.size(); i++)
_iconNames.push_back(_iconFiles.file_string());
this is where it switchs from / to \ for some reason.
[Edited by - namingway on June 22, 2008 7:41:12 AM]
for (int i = 0; i < _iconFiles.size(); i++)
_iconNames.push_back(_iconFiles.file_string());
this is where it switchs from / to \ for some reason.
[Edited by - namingway on June 22, 2008 7:41:12 AM]
You are not doing something stupid like this, are you?
Because you have to escape the backslahes:
char* string = "Graphics\Icons\file.png"
Because you have to escape the backslahes:
char* string = "Graphics\\Icons\\file.png"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement