易截截图软件、单文件、免安装、纯绿色、仅160KB

VS2008调试C出现异常程序如下: - C/C++ / C语言

#include <stdio.h>
main()

int a,b,c;
scanf("%d","%d","%c",&a,&b,&c);
printf("The input is: %c",c);
}

整形转字符型,你不怕溢出?

改了一下,还是出错:



改成楼上的

要用多个双引号,把中间的逗号去掉
scanf("%d" "%d" "%c",&a,&b,&c);


麻烦各位,我是在调这个程序时出现的scanf函数出错;(下面的红色代码)
#include <stdio.h>
#define INFINITY 1000
#define MAX_VERTEX_NUM 20
#define ERROR 0
#define OK 1
typedef enum{DG,DN,UDG,UDN} GraphKind;
typedef int VRType;
typedef int InfoType;
typedef char VertexTpye;
typedef int Status;
typedef struct ArcCell
{
VRType adj;
InfoType *info;//该弧相关信息的指针
} ArcCell,AdjMatrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM];
typedef struct
{
char vexs[MAX_VERTEX_NUM];
AdjMatrix arcs;
int vexnum,arcnum;
GraphKind kind;
}MGraph;

main()
{
MGraph G;
int i,j,k,w,IncInfo;
char v1,v2;
char d;
int LocateVertex(MGraph,VertexTpye);
printf("please Enter into the number of Vertex Arc and Arc_information:\n");
scanf("%d,%d,%d",&G.vexnum ,&G.arcnum,&IncInfo);
printf("The Number of Vertex is %d,The Number of Arc is %d\n",G.vexnum ,G.arcnum );
//ffl


相关问答:

linux环境下gethostbyname函数问题 - C/C++ / C语言

写了个测试程序如下
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

求教c/c++语言相关问题 - C/C++ / C语言

有一10*10矩阵,除去第一个点(0,0)和最后一点(9,9),还有八个点为1,其他都为0,要求用二维数组表示。八个点是随机生成的,编写相关程序表示矩阵所有可能情况。
真心求教各位高手,哎!本人太菜了!呵呵!
......

求助:C代码改写成VB代码 - VB / 基础类

谁能帮我把下面这些代码改成VB形式的,多谢了,急用~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号