Please read the new rule regarding the restriction on the use of AI tools. ×

Waltherx's blog

By Waltherx, history, 5 years ago, In English

Hello,

I am trying to submit a problem, but I am getting weird errors. F.e. I have the same code as the solution, but when I submit the code, my output is f.e. 224123412 insted of only 1 number... I have Dev-C++ 5.11 enviroment and TDM-GCC 4.9.2 Compiler, but I don't even know what language am I supposed to choose, I tried every C++ language (every version), but it still doesn't work. What do I have to download in order to make it work?

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

| Write comment?
»
5 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Hi just took a look at your latest submission 65605868 and you did not initialize the variable d.

to fix, change

int a, b, d;

into

int a, b, d=0;
  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you taking your time to answer. But I am still very confused. What language do I take while submitting, what is the difference between Microsoft Visual C++ 2017 or f.e. GNU G++11 5.1.0 I wrote this in C++, but what version is this, I am so confused

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

      They are different compiler versions. You should switch to G++14, it's the fastest. (Also I don't think many people are using C++17 features.)

      • »
        »
        »
        »
        5 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        hmm, how do I make this switch, I don't even know what version I am using now...

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

          There is a drop down menu, just click on where it shows the language in the submit files area and you can change it.