문제

I have a boost path that points to some directory. How do I construct a path that points to a file in that directory?

Please comment if this is an obvious thing. Im new to C++ and in Java it's this easy:

File file = new File(theDirectory, "filename.txt");
도움이 되었습니까?

해결책

use append e.g.

path /= filename; 

다른 팁

Path has a convenience operator/ that you may find useful for this purpose:

auto file = directory / "filename";
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top