Questions tagged [compiler-specific]

47 questions
-1
votes
2 answers

Why does the following c code work in turbo c and not in devc++?

I have the following piece of code: char *str; gets(str); Now it works in turbo c but fails to in devc. I have to add the following in order to make it work in devC++. char *str = malloc(5); Can anyone explain, why is it so? Also, which one is…
Anonymous
  • 145
  • 1
  • 1
  • 12
-2
votes
2 answers

Why does this C++ program work in some compilers but not others? What is the major difference between c++ compilers?

I have written this program for my class. I have found it compiles and runs just fine with the GNU g++ compiler. My professor auto-grades our programs from his website, which uses the Microsoft Visual Studio compiler and it throws an error. I have…
1 2 3
4