求大神帮助。从网上找了个贪吃蛇的代码,但是总是运行错误,求帮助,刚刚开始学习c++。

http://yun.baidu.com/share/link?shareid=2570961242&uk=3424030372

1个回答

那就再找一个呗。google上有的是

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
wordcount运行错误求帮助
14/10/25 22:33:25 INFO input.FileInputFormat: Total input paths to process : 4rn14/10/25 22:33:25 INFO mapred.JobClient: Running job: job_201410252213_0003rn14/10/25 22:33:26 INFO mapred.JobClient: map 0% reduce 0%rn14/10/25 22:33:35 INFO mapred.JobClient: Task Id : attempt_201410252213_0003_m_000000_0, Status : FAILEDrnjava.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.InputSplitrn at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:323)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)rn at org.apache.hadoop.mapred.Child.main(Child.java:170)rnrn14/10/25 22:33:35 INFO mapred.JobClient: Task Id : attempt_201410252213_0003_m_000001_0, Status : FAILEDrnjava.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.InputSplitrn at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:323)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)rn at org.apache.hadoop.mapred.Child.main(Child.java:170)rnrn14/10/25 22:33:41 INFO mapred.JobClient: Task Id : attempt_201410252213_0003_m_000001_1, Status : FAILEDrnjava.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.InputSplitrn at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:323)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)rn at org.apache.hadoop.mapred.Child.main(Child.java:170)rnrn14/10/25 22:33:41 INFO mapred.JobClient: Task Id : attempt_201410252213_0003_m_000000_1, Status : FAILEDrnjava.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.InputSplitrn at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:323)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)rn at org.apache.hadoop.mapred.Child.main(Child.java:170)rnrn14/10/25 22:33:47 INFO mapred.JobClient: Task Id : attempt_201410252213_0003_m_000000_2, Status : FAILEDrnjava.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.InputSplitrn at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:323)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)rn at org.apache.hadoop.mapred.Child.main(Child.java:170)rnrn14/10/25 22:33:47 INFO mapred.JobClient: Task Id : attempt_201410252213_0003_m_000001_2, Status : FAILEDrnjava.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.FileSplit cannot be cast to org.apache.hadoop.mapred.InputSplitrn at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:323)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)rn at org.apache.hadoop.mapred.Child.main(Child.java:170)rn请问这是什么问题?
编译没有问题但是运行错误 求帮助
#include "mydll.h"rn#includern#include rn#includernvoid main()rnrn struct image img1,img2;rn FILE *fp1,*fp2;rn unsigned char *pdata;unsigned char *pdata1;unsigned char r,b,g;rn int i,j,k,sum=0,a[3];rnrn fp1=fopen("G:\\imgest\\Debug\\1.txt","w");rn fp2=fopen("G:\\imgest\\Debug\\2.txt","w");rn imgfiletomat("G:\\imgest\\Debug\\1.jpg", &img1);rn img2.height=img1.height;img2.width=img1.width;img2.numcolors=1;rn pdata1=(unsigned char*)malloc(img1.height*img1.width*sizeof(unsigned char));rn rn rn for(i=0;i
求 c/c++大神帮助
quint32 crc:1;rn什么意思啊?经常看到这些
c语言 求大神帮助
[size=16px]]从键盘上任意按下一个键输出是什么键 rn例如 当你输入个字母键 则输出 你按下的是字母键 包括字母 数字 和标点符号rnrn 如何编程[/size]
学习困难求大神帮助
public class ChatReceive extends Thread rn rn @Overridern public void run() rn try rn //建立udp的服务,要监听一个端口rn DatagramSocket socket = new DatagramSocket(9090);rn //准备空的数据包存储数据rn byte[] buf = new byte[1024];rn DatagramPacket packet = new DatagramPacket(buf, buf.length);rn [color=#FF0000] boolean flag = true;rn while(flag)rn socket.receive(packet);rn // packet.getAddress() 获取对方数据 包的IP地址对象。rn System.out.println(packet.getAddress().getHostAddress()+"说:"+new String(buf,0,packet.getLength()));rn rn //关闭资源rn socket.close();[/color]rn rn catch (IOException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn rn rnrn为什么关闭资源时候需要声明一个boolean变量,把while条件改成true不行吗…public class ChatReceive extends Thread rn rn
刚刚开始学习。请帮助
请详细解释一下:rnrn#define outb_p(value,port) \rn__asm__ ("outb %%al,%%dx\n" \rn "\tjmp 1f\n" \rn "1:\tjmp 1f\n" \rn "1:"::"a" (value),"d" (port))
求取星期几!!!求大神帮助
![图片说明](https://img-ask.csdn.net/upload/201607/01/1467345462_777440.png)nn选取的年份 来求星期几 n![图片说明](https://img-ask.csdn.net/upload/201607/01/1467345509_970629.png)n这张图片有说明 我吧我的js贴出来 你们帮我看看 那不对 谢谢 nn```n function tuaisuan()n var shijian = $("#EntTime32").val();n var arr = shijian.split('-');n n var nian = parseFloat(arr[0]);n var yue = parseFloat(arr[1]);n var ri = parseFloat(arr[2]);n var shiji = parseFloat(arr[0].substring(0,2));n var nian1 = parseFloat(arr[0].substring(2));n n //求星期n if(yue<3)n var yue1=yue+12n /*var xingqi = parseFloat(nian1+[nian1/4]+[shiji/4]-2*shiji+[26*(yue1+1)/10]+ri-1);n alert(xingqi);n 不知道为什么结果不对 我只好给他分段计算了n */n var s1 = nian1/4n var s2 = shiji/4n var s3 = 2*shijin var s4 = 26*(yue1+1)/10n var s5 = parseInt(nian1+s1+s2-s3+s4+ri-1)n alert(s4);alert(s5);n n elsen //var xingqi = parseInt(nian1+[nian1/4]+[shiji/4]-2*shiji+[26*(yue+1)/10]+ri-1);alert(xingqi); 不知道为什么结果不对 我只好给他分段计算了n var s1 = nian1/4n var s2 = shiji/4n var s3 = 2*shijin var s4 = 26*(yue+1)/10n var s5 = parseInt(nian1+s1+s2-s3+s4+ri-1)n /*alert(s1);alert(s2);alert(s3);*/alert(s4);alert(s5);n n n```nn
求高手,求大神帮助~
我要做个库存管理系统,代码我基本已经编写完了,但是运行之后,数据显示不了,我估计问题是出在文件的读写上。rn改了很久都没有成效啊。。。伤心~有没有谁可以帮忙解决一下,修改一下代码的,我的QQ549140601~rn求帮助啊。。。谢谢啦
求帮助。求帮助
接收一串字符串,格式像这样的(key=value|key=value||||)key 代表Field的name,value代表set进Object中的值,将他装换成一个Object对象,调用setter方法为其赋值,我用下面的方法调用method.invoke(obj, obj..);测试的时候用的其中一个Bean类Student。Student里面有很多Filed,怎么把value(String)转换invoke方法的第2个参数的类型啊,是像我下面那样一个一个判断吗,还是有别的方法啊。大家帮帮忙=。= 谢谢……^^rnrn[code=java]rnpackage com.ytbysj.util;rnrnimport java.lang.reflect.InvocationTargetException;rnimport java.lang.reflect.Method;rnimport java.util.HashMap;rnimport java.util.Iterator;rnimport java.util.Map;rnimport java.util.StringTokenizer;rnimport java.util.Map.Entry;rnrnimport com.ytbysj.beans.Student;rnimport com.ytbysj.exception.FooException;rnrn/**rn * Message Handler类rn * @author haniyaseyorn *rn */rnpublic class MessageHandler rn rn /**rn * 将message转换成Map对象rn * @param message like:key=value|key=value||||rn * @return 通过message转换成的MAP key=valuern */ rn public static Map messageHandler(String message)rn //如果message=null则抛出异常rn if(message == null) throw new FooException("MessageHandler messageHandler(String message) message=null");rn //简单判断message的格式rn if(message.indexOf("|") == -1) throw new FooException("MessageHandler messageHandler(String message) message do not contains \"|\"");rn if(message.indexOf("=") == -1) throw new FooException("MessageHandler messageHandler(String message) message do not contains \"=\"");rn rn //定义Map对象rn Map map = new HashMap();rn rn //定义StringTokenizer对象 并指定"|"为分隔符rn StringTokenizer stken = new StringTokenizer(message, "|");rn rn /*rn * 循环StringTokenizer中的对象 并复制到Map中rn */rn while (stken.hasMoreTokens()) rn String[] temp = stken.nextToken().split("=");rn map.put(temp[0], temp[1]);rn rn return map;rn rn rn /**rn * 根据给定的message和Class构造一个?对象rn * @param message like:key=value|key=value||||||rn * @param clazz ?的Class对象rn * @return clazz.newInstance()rn */rn public static Object getObject(String message, Class clazz)rn //获取Maprn Map map = messageHandler(message);rn //判断Map是否为空rn if(map.isEmpty()) throw new FooException("MessageHandler getObject(String message, Class clazz) map is empty");rn rn Object obj = null;rn try rn obj = clazz.newInstance();rn Iterator> ite = map.entrySet().iterator();rn while(ite.hasNext())rn Entry entry = ite.next();rn //取出每一个key valuern String item_name = entry.getKey().trim();rn String value = entry.getValue().trim();rn //构造方法名rn String methodName = "set" + String.valueOf(item_name.charAt(0)).toUpperCase() + item_name.substring(1);rn //获取Field的类型rn Class type = clazz.getDeclaredField(item_name).getType();rnSystem.out.println(methodName + "," + value + "," +type.getName());rn //获取Method对象rn Method method = clazz.getDeclaredMethod(methodName, type);rn rn //判断Field类型rn if(type == value.getClass())rn method.invoke(obj, value);rn else if(type == int.class)rn method.invoke(obj, Integer.parseInt(value));rn //..如果在这里接着判断有很多不方便的地方-。-rn rn catch (InstantiationException e) rn e.printStackTrace();rn catch (IllegalAccessException e) rn e.printStackTrace();rn catch (SecurityException e) rn e.printStackTrace();rn catch (NoSuchFieldException e) rn e.printStackTrace();rn catch (NoSuchMethodException e) rn e.printStackTrace();rn catch (IllegalArgumentException e) rn e.printStackTrace();rn catch (InvocationTargetException e) rn e.printStackTrace();rn rn return obj;rn rn rn public static void main(String[] args) rn String message = "student_no=0810024103|password= |username=叶婷|sex=男" +rn "|moblie=12296736137|native_place=重庆|college= |tie=软件工程|stuclass=09级2班|limits=3";rn System.out.println(getObject(message,Student.class));rn rnrn[/code]
求帮助!!!求帮助!!!
小弟用的是BCB 6.0,最近要开发SFTP,不知道有没 sftp的控件。小弟刚用bcb.忘大家说的详细点。谢谢!!rn
求大神帮助
求大神帮助 运行软件时出现以下问题,求大神解决。 模块“vcl50.bpl”中地址400d625e处的访问冲突。地址读数 access violation at address 400d625e in module ‘vcl50.bpl’. read of address 00000004 ...
求各位大神帮助
求解:1.oracle中可以编写sql语句建立本地文件夹吗。rn 2.oracle中怎么遍历读取指定路径下所有的图片文件并插入到数据库(根目录确定,查询包含根目录下的所有图片)。rn求脚本解决。
求大神帮助!
有一个文件shop.dat,在该文件中以二进制方式存放了50个用于表示超市商品销rn售记录的结构体类型数据。结构体的声明如下:rnstruct Salesrnrn int ID;//商品编码rn char name[30];//商品名称rn int num;//商品数量rn float price;//商品单价rnrn编写一个函数,将shop.dat 文件中的数据读出,并且构建1 个商品销售记录数组A;rn编写一个函数,删除上述所生成数组A 中单价小于4000 元的商品销售记录;rn编写一个函数,将经过上述处理的数组A 按照商品编码进行递增排序,并rn将排序后的全部结果显示在屏幕上,每种商品的数据占一行,显示格式为:rn111 IPad2 2 4688.00rn122 Iphone4S 3 5899.00rnrn求大神帮忙实习简单的代码!
大神们。。求帮助
怎么判断一个stringrn为数字rn包括中文的rn一千八百四十二或者壹仟贰佰或者15687rn这样子rn rn正则可以吗。谁可以帮忙写个。。有点迷糊。
求大神帮助 第一次
[img=https://img-bbs.csdn.net/upload/201612/14/1481719652_459471.jpg][/img][img=https://img-bbs.csdn.net/upload/201612/14/1481719659_192480.png][/img]怎么改成全屏背景
求大神帮助啊
用VFP编程序,定义一个自由表作为临时表,运行程序的时会在表中临时添加数据,程序运行完成后表中数据会被清除掉,程序在VFP中运行完好,但是编译之后脱离VFP环境运行时提示说这个临时表是以只读模式打开,不能添加数据,程序中打开数据表是以独占模式打开的,求解决方法,求帮助,急!只有20分了,不要嫌少,谢谢
大神,求帮助
我做了一个窗体,想把数据输入到ACCESS中,怎么写代码啊[img=https://img-bbs.csdn.net/upload/201512/27/1451228303_584294.png][/img]
求大神帮助。
1.1题目的内容与要求rn内容:设计一个简单的字母连连看游戏软件。rn要求:rn1)程序运行时在屏幕上随机显示3*3的字母组合;rn2)该字母组合8个是成对儿出现,也就是4个不同的字母,不成对儿的那个字母要与出现的其他字母不同;rn3)3*3位置按行计数,分别1~9,消除某一对儿时必须是在键盘上按对了两个相同字母所在的位置;rn4)若按到不成对儿那个字母所在的位置,游戏结束。若4对儿已经消除,则提示游戏过关,恭喜用户;否则提示闯关失败。
求qt大神帮助
我想写一个简单的记账软件,现在遇到了问题,布置好界面后,想要获得QLineEdit中用户输入的int数据应该怎么做,想要保存这个数据怎么做。。。。qt小白,这是作业但是是自学qt
求大神帮助!!!!
如何继承Textview并把他的属性包装在一个属性中进行统一调用
求大神帮助!!!!!!!!!!
现在公司要求设计一个智能ai的实验项目主要是实现简单的智能语音交互平台需要软硬件的设计,就是说都需要哪些硬件,需要开发哪些软件系统?我现在的认为就是:     硬件:需要一个pc机,麦克风,用来获取语音输入(或者直接使用一个移动设备)     软件:          1、交互界面,主要用于智能系统唤醒、关闭等服务          2、语音分析系统,用于对输入的语音预处理,获取语音,降噪,增强音...
大神求帮助。。
[img=https://img-bbs.csdn.net/upload/201501/16/1421370502_883936.jpeg][/img]rnrn请帮忙分析一下什么原因。。。
新手求大神帮助!
求大神帮忙把这段程序改到可以在C++程序运行,我才学不久。rnrnrn#define N 30 rn#include rn#include rnstruct student rnchar name[20]; char phone[50]; char stunum[15]; char dorm[20];stu[N];rnrnvoid printf_face()rn printf("\n\t姓名\t电话号码\t学号\t宿舍号\n"); rnrnvoid printf_one(int i)rn printf("\t%s\t%s\t%s\t%s\n",stu[i].name,stu[i].phone,stu[i].stunum,stu[i].dorm); rnrnvoid printf_n(int n)rn int j;rn for(j=0;j\n\n 1).姓名 2).电话号码 3).学号 4).宿舍号 5).所有数据 6).取消并返回");rn rn printf("请选择?: [ ]\b\b");rn scanf("%d",&c);rn if(c>6||c<1) puts("\nChoose error! Please again!"); getchar();rn while(c>6||c<1);rn dorn switch(c)rn case 1: printf("name:"); scanf("%s",stu[i].name); break;rn case 2: printf("phone:"); scanf("%s",stu[i].phone); break;rn case 3: printf("stunum:"); scanf("%s",stu[i].stunum); break;rn case 4: printf("dorm:"); scanf("%s",stu[i].dorm); break;rn case 5: input(i); break;rn case 6: menu(); rn rn puts("\nNow:\n");rn printf_face(); printf_one(i);rn printf("\n确定?\n\n\t1).是 2).不,重新修改 3).返回不保存 [ ]\b\b");rn scanf("%d",&w1);rn while(w1==2);rn return(w1);rnrnrnvoid input(int i)rn printf_face(); printf("\t");rn scanf("%s\t%s\t%s\t%s",stu[i].name,stu[i].phone,stu[i].stunum,stu[i].dorm); rnrnvoid save(int n)rn FILE *fp; int i;rn if((fp=fopen("file","wb"))==NULL)rn printf("\nCan not open file\n");rn exit(0);rn rn for(i=0;i6)rn w1=1;getchar();rn else w1=0;rnrn while(w1==1);rn switch(n)rn; rn case 1: enter(); break;rn case 2: add(); break;rn case 3: delete(); break;rn case 4: modify(); break;rn case 5: search(); break;rn case 6: exit(0); rn rnrnrnvoid enter() rn int i,n;rn printf("How many student(0-%d)?:",N-1);rn scanf("%d",&n);rn printf("请输入数据:\n");rn for(i=0;i2) printf("输入错误!请重新输入!\n"); w2=1;rn while(w2==1);rn if(w1==1)rn dorn k=-1; rn dorn printf("\n\nEnter name that tou want to search!\nName:");rn scanf("%s",s.name);rn for(i=0;i
求大神帮助!!
编写了一套手机端网站,编写了内容后发现偶尔会有个别字体出现乱码的现象,都是些笔画较多,生僻字,但是同一页面内,该字有的乱码,有的不乱码,其他页面内该字体也不会乱码。一直没找到原因,求大神指点,感谢!!!
求大神帮助下
#include rn#include rnusing namespace std;rnrnlong b2ten (char *a,int b)//输入一个b进制的数,输出该数的十进制的数值rn int i,temp=0;rn int len=strlen(a);rn for (i=0;i=b)rn return -1;rn temp*=b;rn temp+=a[i]-'0';rn rn return (long)temp;rnrnrnint main()rnint b;rn rn char a1[8],a2[8],a3[3];rn rn long b1,b2,b3;rn cout <<"please input three numbers"<>*a1>>*a2>>*a3;rn for (b=2;b<16;b++)rn b1=b2ten(a1,b);rn b2=b2ten(a2,b);rn b3=b2ten(a3,b);rn if(b1==-1||b2==-1||b3==-1)rn cout<<"there is no answer !fuck!"<
求帮助,,谢谢大神
简单的编写银色滚球的C++的程序怎么编写啊!!谢谢!
求大神帮助多表查询
请问:rn有2个表,一个是全员信息表(人员编号,姓名,性别,身份证号,子女数),表中有男有女,只有女性的子女数字段是有效的,男性的话这个字段没有值,另一个表是子女表(人员编号,姓名,性别,出生日期,身份证号,母亲编号),其中子女表中的母亲标号就是全员信息表中的人员编号,理论上说子女表中的对应妇女编号的条目数应该是和子女数是一致的,但是现在有部分数据不一致。求帮助用sql语句查询出这些信息,输出信息的列为:人员编号,姓名,性别,身份证号,子女数,子女表中对应的条目数。rn谢谢!rn
求大神帮助!NoclassDefFoundError
将其他人写的项目导入自己的工作空间中。rn引用第三方包时,项目已经不报错了,但是一运行就报下面这个错误rn10-29 03:24:30.070: E/AndroidRuntime(808): java.lang.NoClassDefFoundError: android.support.v4.view.ViewConfigurationCompatrn这个类在我那个包里面是存在的。怎么都找不到。rn网上说过的方法我几乎都试过了,没用,还是这样。rnhttp://blog.csdn.net/huangrangg12/article/details/8131325rnhttp://ydpzg.blog.163.com/blog/static/17152629420127111178154/rn还有一些博客给出的解决方法就不贴出来了,总之都尝试过。不行~~~rn有木有大大碰到过这种情况啊~~rn搞了两天了。昨天下午本来弄好了,运行起来了。结果我不小心删除了工程,重新导又不行了。rn
求大神帮助!!!
package readmission.file;rn rn rnimport javax.servlet.http.*;rnimport javax.servlet.jsp.*;rnimport java.sql.*;rnrnimport javax.servlet.*;rnrnimport validata.ValidataNumber;rnrnimport java.util.* ;rnimport java.io.* ;rnimport include.nseer_db.*;rnimport include.nseer_cookie.*;rnimport include.operateDB.CdefineUpdate;rnrnpublic class outincount_ok extends HttpServletrnrnpublic synchronized void service(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletExceptionrnHttpSession dbSession=request.getSession();rnJspFactory _jspxFactory=JspFactory.getDefaultFactory();rnPageContext pageContext = _jspxFactory.getPageContext(this,request,response,"",true,8192,true);rnServletContext dbApplication=dbSession.getServletContext();rnServletContext application;rnHttpSession session=request.getSession();rnnseer_db_backup1 readmission_db=new nseer_db_backup1(dbApplication);rnnseer_db_backup1 finance_db=new nseer_db_backup1(dbApplication);rnValidataNumber validata=new ValidataNumber();rncounter count=new counter(dbApplication);rnString sql3="select * from readmission_patient";rnResultSet rs=readmission_db.executeQuery(sql3);rnString start_time=request.getParameter("start_time");rnString end_time=request.getParameter("end_time");rnString[] medicalnum=new String[100];rnint lcount=0;rntryrn if(readmission_db.conn((String)dbSession.getAttribute("unit_db_name")))rn rn int yes1=end_time.compareTo(start_time);rn if(yes1>0)rn rn rs.next();rn String register_in_time=rs.getString("register_in_time");rn System.out.println("register_in_time");rn int yes2=register_in_time.compareTo(start_time);rn if(yes2>=0)rn rn int yes3=register_in_time.compareTo(end_time);rn while(yes3<=0)rn rn medicalnum[lcount]=rs.getString("mediacl_num");rn lcount++;rn System.out.println("mediacl_num"+lcount);rn rs.next();rn rs.getString("register_in_time");rn yes3=register_in_time.compareTo(end_time);rn rn //String sql = "insert into readmission_patient(medical_num,hospital_num,name,sex,age,tel,card,address,state,anamnesis,remarks1,sections,bunk_num,remarks2,register,register_in_time,register_out_time) values ('"rn // +medical_num+"','"+hospital_num+"','"+name+"','"+sex+"','"+age+"','"+tel+"','"+card+"','"+address+"','"+state+"','"+anamnesis+"','"+remarks1+"','"+sections+"','"+bunk_num+"','"+remarks2+"','"+register+"','"+register_in_time+"','"+register_out_time+"','"+"')";rn response.sendRedirect("readmission/file/outincount_ok.jsp");rn rn rn elsern response.sendRedirect("readmission/file/outincount_not_ok.jsp"); rn rn elsern response.sendRedirect("readmission/file/outincount_not_ok.jsp");rn readmission_db.close();rn catch (Exception ex)rn ex.printStackTrace();rn rn rn rn运行到ResultSet rs=readmission_db.executeQuery(sql3);报错就不往下执行了!rn报错为:at include.nseer_db.nseer_db_backup1.executeQuery(nseer_db_backup1.java:100)rn at readmission.file.outincount_ok.service(outincount_ok.java:45)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at include.anti_repeat_submit.SubmitFilter.doFilter(SubmitFilter.java:85)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn
类型转换 求大神帮助
Arraylist arr= new Arraylist();rnuser.setH_name(rs.getString("h_name"));rnuser.setH_age(rs.getString("h_age"));rnuser.setH_id(rs.getString("h_id"));rnuser.setH_phone(rs.getString("h_phone"));rnarr.add(user) rnrn数据库里面的 h_age 之类的都是 number类型的 rnrnuser里面 h_age定义的 是int类型 rnrnrn请问怎么将这里的int 类型的 H_age 转化成string类型呢??rn我想要的是 将 arraylist 里面全部存放 string类型rnrn新手发帖 求大声帮忙
编译出错,求大神帮助
我初学VCrn和视频教程中一样的代码,视频是VC2003,我用的是VC2010rn一样的代码出错,rnrn代码很少,就是出错,不知道如何解决,rn代码如下rnGlobal.hrn[code=c]#pragma oncern#include "QWinApp.h"rn#include "stdafx.h"rnrnrnextern QWinApp* g_pWinApp;rnextern QWinApp* GlbGetApp();rn[/code]rnrnGlobal.cpprn[code=c]#include "Global.h"rnrnQWinApp* g_pWinApp = NULL;rnrnQWinApp* GlbGetApp()rnrn return g_pWinApp;rnrn[/code]rnrnQWinApp.hrnrn[code=c]#pragma oncern#include "stdafx.h"rn#include "Global.h"rnrnclass QWinApprnrnpublic:rn QWinApp(void);rn ~QWinApp(void);rnrnpublic:rn virtual BOOL InitInstance();rn virtual BOOL ExitInstance();rn virtual void run();rnrnpublic:rn LPVOID m_pMainWnd;rnrn;rn[/code]rnrnQWinApp.CPPrnrn[code=c]#include "QWinApp.h"rnrnQWinApp::QWinApp(void)rnrn m_pMainWnd = NULL;rn g_pWinApp = this;rnrnrnrnQWinApp::~QWinApp(void)rnrnrnrnBOOL QWinApp::InitInstance()rnrn return TRUE;rnrnrnBOOL QWinApp::ExitInstance()rnrn return TRUE;rnrnrnvoid QWinApp::run()rnrn MSG msg;rn while(GetMessage(&msg,NULL,0,0))rn rn ::TranslateMessage(&msg); //翻译消息rn ::DispatchMessage(&msg); //派遣消息rn rnrn[/code]rnrn错误提示如下rnrnd:\visual studio 2010\projects\windows窗口\windows窗口\global.h(6): error C2143: 语法错误 : 缺少“;”(在“*”的前面)rn1>d:\visual studio 2010\projects\windows窗口\windows窗口\global.h(6): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrn1>d:\visual studio 2010\projects\windows窗口\windows窗口\global.h(6): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrn1>d:\visual studio 2010\projects\windows窗口\windows窗口\global.h(7): error C2143: 语法错误 : 缺少“;”(在“*”的前面)rn1>d:\visual studio 2010\projects\windows窗口\windows窗口\global.h(7): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrn1>d:\visual studio 2010\projects\windows窗口\windows窗口\global.h(7): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrn1>d:\visual studio 2010\projects\windows窗口\windows窗口\qwinapp.cpp(6): error C2440: “=”: 无法从“QWinApp *const ”转换为“int *”rn1> 与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换rn1> Global.cpprn1> 正在生成代码...rn1>rn1>生成失败。rnrn实在不知道如何解决,这里大神多,帮助我这小白,万分感谢。
菜鸟求大神帮助
import javax.swing.JOptionPane;rnpublic class PC rn public static void main(String[] args) rn int option=0;rn dorn String yearstring=JOptionPane.showInputDialog("请输入一个年份(如:2010):");rn int year=Integer.parseInt(yearstring);rn String monthstring=JOptionPane.showInputDialog("请输入一个月份(如:8):");rn int month=Integer.parseInt(monthstring);rn //JOptionPane.showMessageDialog(null,printmonth(year,month));rn System.out.println(printmonth(year,month));rn option=JOptionPane.showConfirmDialog(null,"countinue?");rn while(option==JOptionPane.YES_OPTION);rn rn static String printmonth(int year,int month)rn String printmonth=printmonthtitle(year,month);rn printmonth+=printmonthbody(year,month);rn return printmonth;rn rn static String printmonthtitle(int year,int month)rn String printmonthtitle=" "+year+"年"+getmonthname(month)+"\n";rn printmonthtitle+="----------------------------------\n";rn printmonthtitle+=" SUN MON TUE WED THU FRI SAT \n";rn return printmonthtitle;rn rn static String getmonthname(int month)rn String monthname=null;rn switch(month)rn case 1:monthname="1月";break;rn case 2:monthname="2月";break;rn case 3:monthname="3月";break;rn case 4:monthname="4月";break;rn case 5:monthname="5月";break;rn case 6:monthname="6月";break;rn case 7:monthname="7月";break;rn case 8:monthname="8月";break;rn case 9:monthname="9月";break;rn case 10:monthname="10月";break;rn case 11:monthname="11月";break;rn case 12:monthname="12月";rn rn return monthname;rn rn static String printmonthbody(int year,int month)rn int startday=getstarday(year,month);rn int numberofdaysinmonth=getnumberofdaysinmonth(year,month);rn String printmonthbody="";rn for(int i=0;i
求perl大神帮助~~~
my $location = &is_weekend($day) ? "home" : "work";rnrn这个程序的子程序改如何写?
求jsp大神帮助
求大神帮忙改改图片中显示错误的部分,所有加载left页面的代码都显示这个错误rnrn[img=https://img-bbs.csdn.net/upload/201304/29/1367202437_608688.jpg][/img]rnrnrn[color=#FF0000]错误原因显示的是:[/color]rnMultiple annotations found at this line:rn - ArrayList is a raw type. References to generic type ArrayList should be rn parameterizedrn - List is a raw type. References to generic type List should be parameterizedrn - CommonTool cannot be resolved to a typernrn[color=#FF0000]left.jsp页面的代码:[/color]rnrn<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>rnrnrnrnrn<%@ page import="java.*"%>rn rn rn<%rn Members mem=(Members)session.getAttribute("loginUser");rn if(mem==null)rn%>rn rn rn rn rn rn rn rn 用户名:rn rn rn rn rn rn rn 密 码:rn rn rn rn rn rn 注册 找回密码? rn rn rn rn rn rn rn rn rn <%rn //创建公告信息实现类rn AfficheDaoImp affImp=new AfficheDaoImp();rn List listAff= new ArrayList();rn listAff=affImp.selectAffiche();rn if(listAff!=null)rn for(int i=0;irn <%=affi.getName() %> rn <%%>rn rn rn rnrn rn rn rn rn rn rn rn <%rn //销售排行rn OrderDetailImp imp=new OrderDetailImp();rn List listI=imp.selectDetail();//销售前10位排名rn if(listI!=null)rn for(int i=0;irn <%=i+1%> <%=good.getGoodsName() %> rn <%rn rn %>rn rn rn rnrn rn rn rn rn rn rn rn rnrn <%rn rn if(mem!=null)rn %>rn rn <%rn CommonTool tool=new CommonTool();rn String currentTime=tool.currentTime();rn String currentDay=tool.currentDay();rn %>rn rn 欢迎用户:<%=mem.getName() %> 登录!rn rn <%=currentTime %>rn rn <%=currentDay %>rn rn rn rn 安全退出rn rn rn rn rn rn rn <%rn //创建公告信息实现类rn AfficheDaoImp affImp=new AfficheDaoImp();rn List listAff=new ArrayList();rn listAff=affImp.selectAffiche();rn if(listAff!=null)rn for(int i=0;irn <%=affi.getName() %> rn <%%>rn rn rn rnrn rn rn rn rn rn rn rn <%rn //销售排行rn OrderDetailImp imp=new OrderDetailImp();rn List listI=imp.selectDetail();//销售前10位排名rn if(listI!=null)rn for(int i=0;irn <%=i+1%> <%=good.getGoodsName() %> rn <%rn rn %>rn rn rn rnrn rn rn rn rn rn rn rn rnrn <%rn rn %>
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件