Skip to content

Commit

Permalink
Added #include <string.h> to PREFIX_STRING (for memset)
Browse files Browse the repository at this point in the history
  • Loading branch information
govindparmar2 committed Apr 8, 2023
1 parent 12c5247 commit fb98e3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BrainfuckCompiler/bfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <sal.h>

// Constants for the generated C file
const char PREFIX_STRING[] = "#include <stdio.h>\r\n#include <stdlib.h>\r\nint main()\r\n{\r\n\tchar data[300000];\r\n\tchar *p = &data[0];\r\n\tmemset(data, 0, 300000);\r\n";
const char PREFIX_STRING[] = "#include <stdio.h>\r\n#include <stdlib.h>\r\n#include <string.h>\r\nint main()\r\n{\r\n\tchar data[300000];\r\n\tchar *p = &data[0];\r\n\tmemset(data, 0, 300000);\r\n";
const char SUFFIX_STRING[] = "\treturn 0;\r\n}\r\n";
const char CHG_PTR_STRING[] = "p+=%d;\r\n";
const char INC_PTR_STRING[] = "++p;\r\n";
Expand Down

0 comments on commit fb98e3d

Please sign in to comment.