search

Home  >  Q&A  >  body text

初学 C++,遇到了 liner-gcc 的错误提示,求指点

#include "iostream"
using namespace std;
int main() {
    int arr[1000];
    int j = 0;
    std::cin >> j;
    for (size_t i = 0; i < j; i++) {
        std::cin >> arr[i];
    }

    for (size_t i = 0; i < j; i++) {
        for (size_t m = 0; m < j; m++) {
            if (arr[i] < arr[m]) {
                int a = arr[m];
                arr[m] = arr[i];
                arr[i] = a;
            }
        }
    }

    for (size_t i = 0; i < j; i++) {
        std::cout << arr[i] << endl;
    }
    std::cout << '\n' << endl;
    return 0;
}

liner-gcc报错了:

自己琢磨可能是哪里写的不规范,求指点

PHP中文网PHP中文网2807 days ago550

reply all(1)I'll reply

  • 阿神

    阿神2017-04-17 15:04:46

    My compiler can run and bubbles normally...

    The error message is Permission denied, which means it is a permission problem

    It has nothing to do with your code

    reply
    0
  • Cancelreply