How to create file inside a directory using C
问题 I am trying to create a directory and a file inside the directory. Below is my code in C, but when I try to compile it, I got this error: invalid operands to binary / (have ‘const char *’ and ‘char *’) char *directory = "my_dir"; struct stat dir = {0}; if(stat(directory, &dir) == -1) { mkdir(directory, 0755); printf("created directory testdir successfully! \n"); } int filedescriptor = open(directory/"my_log.txt", O_RDWR | O_APPEND | O_CREAT); if (filedescriptor < 0) { perror("Error creating