ISO C90 forbids mixed declarations and code because of arrays. How do I fix this?
问题 I tried compiling it using -gcc and it worked as intended but when added with -pedantic , it won't compile. I'm still quite a beginner in programming and it is the first time I encountered this problem so it is quite a problem to me. Here is the code that is causing the error: char *exercise[5]={"swimming", "running", "brisk walking", "weight lifting", "zumba"}; I'd appreciate it if you would explain what the solution is instead of just the fixed code because I want to learn. 回答1: This has