我的程序运行没有错误,出现debug,求解决 - 爱问答

(爱问答)

我的程序运行没有错误,出现debug,求解决

FILE *populationFile;

populationFile = fopen("D://Population.txt", "w+");

fprintf(populationFile, "年份    最多人口城市名称   最少人口城市名称   中位数人口城市名称 ");

sort(ve.begin(), ve.end());

int n = ve.size();

int year = ve[0].year;

char mostpersons[10] = {0};

char lesspersons[10] = {0};

char midpersons[10] = {0};

//最多人口的城市名称

for ( i = 0; i < ve[n-1].name.size(); i++)

{

mostpersons[i] = ve[n-1].name[i];

}

//最少人口的城市名称

for ( i = 0; i < ve[0].name.size();i++)

{

lesspersons[i] = ve[0].name[i];

}

//中位数人口的城市名称

if (n % 2 == 0)

{

int mid = (n / 2);

for (int i = 0; i < ve[mid - 1].name.size();i++)

{

midpersons[i] = ve[mid - 1].name[i];

}

}

else

{

int mid = (n + 1) / 2;

for (int i = 0; i < ve[mid - 1].name.size(); i++)

{

midpersons[i] = ve[mid - 1].name[i];

}

}

fprintf(populationFile, "%d%16s%16s%16s", year, mostpersons, lesspersons, midpersons);

fprintf(populationFile, " ");

fclose(populationFile);


scanf("%lf",&stu[m]. phonenumber);这句,搜索一下,凡是这句stu[m]. phonenumber前面有&的,把&都去掉。

有可能是环境变量的毛病

下一篇:java的缘故错误

上一篇:多行输入每行一个数字,多行输出输出顺序和输入相反

热门标签:
excel 网盘 破解 word dll
最新更新:
微软重新评估新的Outlook的使用时机 联想推出搭载联发科Helio G80芯片组的Tab M9平板 英特尔创新大赛时间确定! 微软Edge浏览器在稳定渠道中推出Workspaces功能 英伟达RTX4060TiGPU推出MaxSun动漫主题! 谷歌地图为用户提供了街景服务! GameSir 在T4 Kaleid中推出了一款出色的控制器! 微软开始在Windows 11 中测试其画图应用程序的新深色模式! LG电子推出全球首款无线OLED电视 英伟达人工智能芯片崭露头角! Steam Deck可以玩什么游戏-Steam Deck价格限时优惠 雷蛇推出CobraPro鼠标 Kindle电子阅读器可以访问谷歌商店吗 Windows10如何加入组策略 window10图片查看器怎么没有了?