Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя Waltherx

Автор Waltherx, история, 5 лет назад, По-английски

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?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

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 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      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 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

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

        • »
          »
          »
          »
          »
          5 лет назад, # ^ |
            Проголосовать: нравится +1 Проголосовать: не нравится

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