#zig redirecting stdin to stdout when trying to print out a file for debugging

1 messages · Page 1 of 1 (latest)

fallow crypt
#

there are 2 errors with my code here but the one present rn is that somehow this is trying to read from stdin and writing to stdout? anyway the other problem is that it also completely deletes the contents of the file being opened, if I try and type something I get a sentinel mismatch.

fallow plinth
#

the other problem is that it also completely deletes the contents of the file being opened
You probably need to open the file in append mode, same as c's fopen(<path>, "a")

#

on a briefscan of your code, I can't find any usage of 'stdin', not sure what you're trying to do with stdin

fallow crypt
#

nothing, but zig for some reason waits for input and then redirects stdin to stdout