欢迎来到知识库小白到大牛的进阶之路

当前位置 > c语言程序运行不了c语言程序运行不了为什么

  • c语言为什么程序运行不了?

    c语言为什么程序运行不了?

    数组大小必须是固定的额,这个你可以用malloc函数动态申请内存,用完记得用free释放struct stu *class=(struct stu *class)malloc(sizeof(stu)*n);用的话 *(class+i) 或者 class[i](i相当于数组下标)最后 free(class);头文件加一下stdlib.hstruct stu 可以用typedef起个别名好长时间不接触C了,错误的...

    2024-08-20 网络 更多内容 627 ℃ 215
  • C语言程序运行错误

    C语言程序运行错误

    打印一行的 fAverage被打错成了faverage其他的没什么问题 如果还有错误,就把getch改成getchar#include<stdio.h> void main() {     int iMath,iEnglish;     float fAverage;     iM...

    2024-08-20 网络 更多内容 638 ℃ 506
  • c语言为什么程序运行不了?

    c语言为什么程序运行不了?

    数组大来小必须是固定的 额,这个自你可以用malloc函数动态申请内存,用完记得用free释放 struct stu *class=(struct stu *class)malloc(sizeof(stu)*n); 用的话 *(class+i) 或者 class[i] (i相当于数组下标) 最后 free(class); 头文件加一下stdlib.h struct stu 可以用typedef起个别名 好长时间不接触C...

    2024-08-20 网络 更多内容 129 ℃ 814
  • c语言程序无法运行

    c语言程序无法运行

    #include<iostream> #include <stdio.h> void change(int *p1[3]); void main() { #int *p[3],i,a[3]; #for(i=0;i<3;i++) ##scanf("%d",&a[i]); #for(i=0;i<3;i++) ##p[i]=&a[i]; #change(p); #for(i=0;i<3;i++) ##printf("p[%d]=%d ",i,*p[i]); #system("...

    2024-08-20 网络 更多内容 614 ℃ 546
  • C语言程序运行崩溃

    C语言程序运行崩溃

    这种情况叫做 runtime error (运行时错误)。在 Windows 7 上这样提示:在 Windows XP 上这样提示:runtime  error (运行时错误)就是程序运行到一半,程序就崩溃了。比如说:①除以零②数组越界:int a[3]; a[10000000]=10;③指针越界...

    2024-08-20 网络 更多内容 489 ℃ 392
  • c语言问题这程序为啥运行不了

    c语言问题这程序为啥运行不了

    #include <stdio.h> int main() {     int N, K;     int a[10];     int i, j, temp;     scanf("%d%d", &N, &...

    2024-08-20 网络 更多内容 612 ℃ 223
  • c语言程序问题,运行不了,是为什么呢

    c语言程序问题,运行不了,是为什么呢

    scanf("||%ld||,||%10s||,||%ld||,||%ld||,||%ld||,||%6.2f||,",&p1>num,p1>name,&p1>in,&p1>out,&p1>save,&p1>price); scanf("||%ld||,||%10s||,||%ld||,||%ld||,||%ld||,||%6.2f||,",&p1>num,p1>name,&p1>in,&p1>out,&p1>save,&am...

    2024-08-20 网络 更多内容 694 ℃ 985
  • c语言程序运行问题

    c语言程序运行问题

    while(n){/**其他代码*/}相当于 while(true){ if(n==0){ n; break; } n; /**其他代码*/ } 而while( x++ != (y=1)){/**其他代码*/}中存在语法错误,y不能被赋值为1,因为y返回一个数字,不能对一个数字进行(前后)自增和(前后)自减操作,应该改为y才行(y返回自增后的变量y),while( x++ != ((y)=1)){/**其他代码...

    2024-08-20 网络 更多内容 637 ℃ 116
  • c语言程序运行不出

    c语言程序运行不出

    #include "stdio.h"void main(){ void move(int a[],int,int); int a[20],n,m,i; printf("数组的大小为:"); scanf("%d",&n) ; printf("原来的数组为:\n"); for(i=0;i<n;i++) scanf("%d",&a[i]); printf("要移动数位为:"); scanf("%d&qu...

    2024-08-20 网络 更多内容 507 ℃ 199
  • C语言程序运行错误

    C语言程序运行错误

    是这样,你的程序有两个问题: 1. 逻辑关系错误:如jaybestwang同学所说,while内的逻辑是始终成立的,c不等于'n'就肯定等于'N'嘛,所以改成while(c!='n'&&c!='N') ; 2. 程序设计缺陷:如deng576631589同学所说,scanf函数会把缓冲区的回车符也载入...

    2024-08-20 网络 更多内容 714 ℃ 64
新的内容
标签列表