Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/129.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ C++;无法打开输出文件:权限被拒绝_C++ - Fatal编程技术网

C++ C++;无法打开输出文件:权限被拒绝

C++ C++;无法打开输出文件:权限被拒绝,c++,C++,我一直在寻找解决这个问题的办法。即使我在eclipse中停止该程序,它似乎仍在运行。我必须去任务经理那里结束这个过程,让它停止。这是一个包含查找逻辑错误的家庭作业。我不想让我的家庭作业为我做,但我不知道发生了什么。代码如下: #include <stdio.h> #include <stdlib.h> int main(void) { int i=0; int x; int y; int temp; int array[10]; //Enter n

我一直在寻找解决这个问题的办法。即使我在eclipse中停止该程序,它似乎仍在运行。我必须去任务经理那里结束这个过程,让它停止。这是一个包含查找逻辑错误的家庭作业。我不想让我的家庭作业为我做,但我不知道发生了什么。代码如下:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
 int i=0;

 int x;

 int y;

 int temp;

 int array[10];

 //Enter new data in to array
 for (i=0;i<10;i++)
 {
      printf("\n enter new number = ");
      scanf("%d", &array[i]);
 }

 //Print the new data
 for (i=0;i<10;i++)
      printf("%d ",array[i]);

 //Find the largest number in the array
 for(x = 0; x < 10 ; x++)
      for(y = 0; y < 9; y++)
           if(array[y] > array[y+1])
           {
               temp = array[y+1];

               array[y+1] = array[y];

               array[y] = temp;
           }
  printf(" largest = %d \n", temp);

   for (i=0;i<10;i++)
        printf("%d ",array[i]);

   printf("\n");

   return 0;
}
#包括
#包括
内部主(空)
{
int i=0;
int x;
int-y;
内部温度;
int数组[10];
//在数组中输入新数据

对于(i=0;i如何扣除程序仍在运行,即使在关闭对话框(如果有)之后?可能是您正在读取的文件的文件权限。如果您使用Mac,请使用终端中的
chmod
更改它,如果您使用Windows,请使用
attrib
更改它。代码在哪里停止?在控制台窗口中当前是否有任何输出,直到它没有响应??