Add file I/O

This commit is contained in:
Valk Richard Li
2019-11-27 18:21:20 +08:00
committed by GitHub
parent 05fbd42621
commit 93269ba969
2 changed files with 119 additions and 0 deletions
+12
View File
@@ -14,4 +14,16 @@ var print=func(args...)
var input=func()
{
return __call_cpp_istream_std_cin();
};
# read from file and return a vector of strings
var read=func(filename)
{
return __call_Cpp_ifstream(filename);
};
# write a vector of strings into a file
var write=func(filename,vector)
{
return __call_Cpp_ofstream(filename,vector);
};