Thread: Basic file io
View Single Post
Old 09-16-2019, 10:42 AM   #17
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 255
Default

Per Xenakios' example above I have tried the following in my constructor with no success:

Code:
        WDL_FileWrite outfile("C:\\Documents\\plugin_test_file.txt");
  	if (outfile.IsOpen() == true)
	{
		std::string txt1("Test\n");
		outfile.Write(txt1.data(), txt1.size());
		std::string txt2("Text\n");
		outfile.Write(txt2.data(), txt2.size());
	}
It compiles without error but doesn't create a file nor does it write anything to a file that already exists. What am I missing?
Nonlinear is online now   Reply With Quote