Well, I'll demonstrate a C method because I don't really use std::string.
I'm probably going to get flamed for thisCode:char Drive[4]; std::string WinDir = "C:\\WINDOWS"; memcpy(Drive, WinDir.c_str(), 3); Drive[3] = 0;
Though I'm sure someone else will show a better solution.