krishna_7's blog

By krishna_7, history, 6 years ago, In English

I am getting a compilation error while submitting horrible queries on SPOJ. When I run the code locally, there is no issue and I am getting correct output for the cases I've tried. Someone please take a look at my code and tell me why I am getting a compilation error. Here is my code,

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You're getting error because the queries are horrible. The program knows it will receive a set of horrible queries, so it won't compile. It's self-defense.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Well this did make me laugh. But it would be helpful if you could solve my issue too. :p

    • »
      »
      »
      6 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      If your code compiles OK locally, are you sure you're selecting the correct compiler when submitting?

      • »
        »
        »
        »
        6 years ago, # ^ |
        Rev. 2   Vote: I like it +3 Vote: I do not like it

        Well thank you, I wasted 2 hours only to realise, it compiles fine on C++6.3 and not on C++ 4.3.2. It got accepted now. :)