I'm currently doing some exercises to learn C on CLion but i have noticed that if i create multiple files, when i run the program i can't select from which file so the compiler tries with the whole project. But obviously it gives me back an error because in each of these file i've used the 'main' function. So i'm looking for a way to run a single file inside a project with multiple ones.
By looking around i found out that i can create a 'Run/Debug configuration' for each file, and when i select that i can run the single file. But that's not very comfortable to do each time and i'm not sure if this function is meant to be used like this. (i have already Adjusted the CMakeFile to make the new files executable)
P.S. My level is beginner on C and i just joined a CS science course at the university, so if there are easier IDEs to someone like me please tell me(already used XCode, VScode and CodeBlocks, and at my level they look the same).
thanks.