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

Автор JulitoPeligro, история, 20 месяцев назад, По-английски

Hi, the input file is so big that my vscode and sublime crashed and now I am not able to run it anywhere and get my output! Can anyone pls help me regarding this?

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

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

You don't have to open the input data file for viewing inside the program editor. Just use the file name to open it at run-time, and read the data from the file input stream at run-time as if it is read from the standard input stream. Best wishes.

»
20 месяцев назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

you can run this a.exe < input.txt > output.txt

»
20 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

it is still buffering in cmd and not printing at all

  • »
    »
    20 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    then it might it becuase u have some bug in your code.If u r confident your code is right and will complete execution then pls share how u r reading from files.(sometimes putting wrong filename also causes the buffering issue in sublime)

    • »
      »
      »
      20 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      cf.exe <fbip.txt> output.txt i used this fbip is my input file and cf is my c++ code file please help me!

      • »
        »
        »
        »
        20 месяцев назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        does the file exists at same place where cf.exe is there.?

        If u still get problem use this two lines at the start of main function

            freopen("input.txt", "r", stdin);
            freopen("output.txt", "w", stdout);
        

        write full path of input and output

»
20 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

You may see this.