Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

ifstream relative file path

#include <fstream>
int main() {
    //NOTICE : this path is relative to the folder where you run your binary
    std::ifstream ifs("data/myfile.txt");
    // Do something with the file
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ifstream #relative #file #path
ADD COMMENT
Topic
Name
3+7 =