为什么C++初始程序会报错 [问题点数:20分]

Bbs1
本版专家分:0
结帖率 0%
Bbs7
本版专家分:11367
Blank
红花 2019年2月 C++ Builder大版内专家分月排行榜第一
2017年12月 C++ Builder大版内专家分月排行榜第一
2016年12月 C++ Builder大版内专家分月排行榜第一
2016年11月 C++ Builder大版内专家分月排行榜第一
2016年9月 C++ Builder大版内专家分月排行榜第一
2016年8月 C++ Builder大版内专家分月排行榜第一
Bbs1
本版专家分:0
Bbs7
本版专家分:11367
Blank
红花 2019年2月 C++ Builder大版内专家分月排行榜第一
2017年12月 C++ Builder大版内专家分月排行榜第一
2016年12月 C++ Builder大版内专家分月排行榜第一
2016年11月 C++ Builder大版内专家分月排行榜第一
2016年9月 C++ Builder大版内专家分月排行榜第一
2016年8月 C++ Builder大版内专家分月排行榜第一
Bbs1
本版专家分:0
Bbs7
本版专家分:11367
Blank
红花 2019年2月 C++ Builder大版内专家分月排行榜第一
2017年12月 C++ Builder大版内专家分月排行榜第一
2016年12月 C++ Builder大版内专家分月排行榜第一
2016年11月 C++ Builder大版内专家分月排行榜第一
2016年9月 C++ Builder大版内专家分月排行榜第一
2016年8月 C++ Builder大版内专家分月排行榜第一
为什么报错
insert into RCBGIT04.test.dbo.book3rnselect * from rnopenrowset('MICROSOFT.JET.OLEDB.4.0','Text;Database=C:\;','SELECT aa ,bb FROM [test1.csv]') rn where convert(varchar(20),aa) not in (select aa from RCBGIT04.test.dbo.book3)rn<em>为什么</em>会<em>报错</em>呢?rn服务器: 消息 515,级别 16,状态 2,行 7rn无法将 NULL 值插入列 'aa',表 'test.dbo.book3';该列不允许空值。INSERT 失败。rn语句已终止。rn我的test1.csv中并没有NULL值啊,只有两个字母,好象就是这两个字母所引起的<em>报错</em>,这是怎么回事呢?
为什么报错呢!!!!!!
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)rnrnif (CFrameWnd::OnCreate(lpCreateStruct) == -1)rnreturn -1;rn rnSetTimer(1,1000,NULL);rnreturn 0;rnrnrnrn我想创建一个状态栏的计时器,可老是报下面的错rnerror C2084: function 'int __thiscall CMainFrame::OnCreate(struct tagCREATESTRUCTA *)' already has a bodyrn这是为啥 望各位大虾指教
报错">为什么String.split(".")会报错
[img=https://img-bbs.csdn.net/upload/201407/31/1406798178_610539.jpg][/img]
为什么Class.forName会报错
用的是MyEclipse6.5,Tomcat6.0,在编写jsp的时候没有出错,具体代码如下:rnrnMyEclipse6.5自带的Tomcat好像运行不了,于是启动自己安装的Tomcat,可以读取数据库内容。rn但在java文件中rnClass.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();rn同一句,却有个叉叉,报的是 Unhandled exception type ClassNotFoundException,同一个项目,环境应该没有问题,包应该也添加好了的,而且在MyEclipse6.5的打Class.会出class()、forName()等几个方法的,这究竟是什么问题?
验证码为什么报错
[color=#FF0000]a.jsp[/color]rnrn rn rn rn rn rnrn[color=#FF0000]b.jsp[/color]rnrn 255)rn fc = 255;rn if (bc > 255)rn bc = 255;rn int r = fc + random.nextInt(bc - fc);rn int g = fc + random.nextInt(bc - fc);rn int b = fc + random.nextInt(bc - fc);rn return new Color(r, g, b);rn %>rn< 100; i++) rn int x = random.nextInt(width);rn int y = random.nextInt(height);rn int xl = random.nextInt(12);rn int yl = random.nextInt(12);rn g.drawLine(x, y, x + xl, y + yl);rn rnrn // 取随机产生的认证码(4位数字) rn String sRand = "";rn for (int i = 0; i < 4; i++) rn String rand = String.valueOf(random.nextInt(10));rn sRand += rand;rnrn g.setColor(new Color(20 + random.nextInt(110), 20 + randomrn .nextInt(110), 20 + random.nextInt(110)));rn g.drawString(rand, 13 * i + 6, 16);rn rnrn session.setAttribute("code", sRand);rnrn g.dispose();rnrn ImageIO.write(image, "JPEG", response.getOutputStream());rn%>rnrn<em>报错</em>:rn2010-2-9 11:20:28 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.IllegalStateException: getOutputStream() has already been called for this responsern at org.apache.catalina.connector.Response.getWriter(Response.java:610)rn at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)rn at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)rn at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)rn at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:188)rn at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)rn at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)rn at org.apache.jsp.verification.b_jsp._jspService(b_jsp.java:123)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.filter.EncodingFilter.doFilter(EncodingFilter.java:27)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:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)rn at java.lang.Thread.run(Unknown Source)rn
为什么jQuery会报错
引入jQuery,在谷歌浏览器中打开控制台后刷新页面后会<em>报错</em>,如图:[img=https://img-bbs.csdn.net/upload/201712/18/1513594719_173446.png][/img]
请问为什么报错
--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: An exception occurred processing JSP page /add_single_rule.jsp at line 45rnrn42: );rn46: return temp;rn47: rn48: public String GBK2UNI(String s) throws UnsupportedEncodingExceptionrnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.lang.NullPointerExceptionrn org.apache.jsp.add_005fsingle_005frule_jsp.UNI2GBK(add_005fsingle_005frule_jsp.java:15)rn org.apache.jsp.add_005fsingle_005frule_jsp._jspService(add_005fsingle_005frule_jsp.java:126)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.rnrnrn同样的代码在其他<em>程序</em>里,就没问题,不知道是不是jsp的问题,我使用的是myEclipse进行调试的rn
为什么报错
[code=HTML] rn rn rn [/code]
为什么removeallitems会报错
建立了一个JCOMBOBOXrnrnint ilen=rf.length;rnfor(i=0;i
为什么上传文件会报错
哪个高手看一下呀,谢谢。rnrnasp.net源<em>程序</em>如下:rnrnrnrn rnrnrnrn 上传单个文件! rn当前目录: rnrn rn 文件路径:rn rn 请选择上传文件: rn rn rnrnrnrn在第一个输入框输入“c:\a.txt”,在第二个输入框输入“c:\b.txt”,点击“Upload”按钮,出现以下错误提示:rnrnrn不支持给定路径的格式。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.NotSupportedException: 不支持给定路径的格式。rnrn源错误: rnrnrn行 16: Elsern行 17: Dim Filename as string=File_dir.text & fname.textrn行 18: fileup.PostedFile.SaveAs(Filename)rn行 19: Response.write(filename) rn行 20: 'Response.Redirect("X7-05.aspx?dir=" & cur_dir.text)rn rnrn源文件: c:\inetpub\wwwroot\WebAppTest2\3-10.aspx 行: 18 rnrn堆栈跟踪: rnrnrn[NotSupportedException: 不支持给定路径的格式。]rn System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) +230rn System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Boolean checkForDuplicates, Boolean needFullPath) +461rn System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +168rn System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) +43rn System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +421rn System.IO.FileStream..ctor(String path, FileMode mode) +52rn System.Web.HttpPostedFile.SaveAs(String filename)rn ASP._3_10_aspx.UploadFile(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebAppTest2\3-10.aspx:18rn System.Web.UI.WebControls.Button.OnClick(EventArgs e)rn System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)rn System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)rn System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)rn System.Web.UI.Page.ProcessRequestMain() +1277rnrn rn
为什么这样会报错
rnmain()rnrn struct partrn int number; // 零件的编号rn char name [NAME_LEN+1]; // 零件的名称rn int on_hand; // 现有数量rn part1 = 528, "Disk drive", 10;rn printf_part(part1);rn rn return 0;rnrnrnvoid print_part (struct part p)rnrn printf("part number : %d\n", p.number);rn printf("part name: %s\n", p.name);rn printf("Quantity on hand: %d\n", p.on_hand);rnrn<em>为什么</em>???
为什么报错,高分!!!!!!!!!!!!!!!!!!!!!!!!
Dim Shopping_Bag(3)rnShopping_Bag(0)="1,10"rnShopping_Bag(1)="2,10"rnShopping_Bag(2)="3,10"rn For i=0 to Ubound(Shopping_Bag)rn Id_No=Split(Shopping_Bag(i),",")rn Response.write Id_No(0)&" "rn Response.write Id_No(1)&" "rn NextrnrnId_No=Split(Shopping_Bag(i),",")告诉我这行有错误,如果我把i换成0,1,2的其中一个就可以正常显示,<em>为什么</em>,怎么解决?
为什么会这样报错
这是我编写的线程函数:rn[code=C/C++]static DWORD WINAPI ThreadProc(void*);rnHANDLE handle=_beginthreadex(NULL,0,ThreadProc,(void*)p,0,NULL);[/code]rn这是编译器<em>报错</em>内容:rnerror C2440: 'initializing' : cannot convert from 'unsigned long' to 'void *'rn Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castrn我明明已经将函数设为static了,<em>为什么</em>会这样<em>报错</em>?
为什么KeyboardInput()会报错?
//编写一个<em>程序</em>,输入10个整数计算并显示它们的和,平均值rnpublic class Program2rn public static void main(final String[] args)rn KeyboardInput input=new KeyboardInput();rn System.out.println("Please enter ten integers:");rn int i=1,sum=0;rn double sql=0;rn while(i + sql);rn rnrn
为什么存储过程会报错
这边有一个存储过程,写了很多查询语句然后union起来,原来是不会<em>报错</em>的,我现在需要更改其中的日期条件,然后把新的条件查出来的语句union起来,但是我union超过两个就会<em>报错</em>,老是最后的语句被截断,查不了rnrn语句大概是这个样子rn[code=sql]select * from (rnselect * from 表1 where rq between 1 and 2rnunion allrn[b]select * from 表1 where rq between 5 and 6[/b]rnunion allrnselect * from 表2 where rq between 3 and 4rn) where 条件[/code]rnrn加粗的呢就是我加上去的语句,除了rq的条件不一样还有把他查出来的语句group by了之外,其他没改变过,但是最后的where 条件老是会断掉,就是rnwhere a.bh=b.bh类似这种,他会断掉成 a.bh=反正就是读取不了完整的条件,删了就可以,请问这是什么原因?
这里为什么报错
[code=C/C++]rnmultiset >::key_compare kc=c2.key_comp();rn[/code]rnrn<em>报错</em>如下:rnerror C2440: 'initializing' : cannot convert from 'struct std::less' to 'struct std::greater'rn No constructor could take the source type, or constructor overload resolution was ambiguous
为什么这样会报错
void fn(char **);rnint main()rnrn char s[10][10];rn fn(s); // 编译器说无法从char[][]转换为char**rnrnrn<em>为什么</em>?
为什么str.decode会报错
decode和encode:在python中保存会按照默认的编码格式保存为unicode格式,unicode可再读取到内存时可以使用encode来设置读取到内存中的编码格式,而在在python解释器运行时,如果脚本中有新的变量需要申请内存时,同样会按照unicode格式编码,此时decode就不能用了。 ...
这里为什么报错??
我想用下面的方法判断socket是否连接好,<em>为什么</em>第一行汇<em>报错</em>NullPointerException~~我觉得没有指空呀rnrnif(T.socket.getInetAddress()!=null)rn rn JDialog Td2 = new JDialog(fTran,"系统传送错误",true);rn rn Td2.add(new JLabel("用户没有与任何计算机联网"));rnrn ……rnrn
为什么这个会报错
<em>为什么</em>在eclipse里这条语句会<em>报错</em>?Map m1 = new HashMap();rnType mismatch: cannot convert from HashMap to Maprn本人新手,望高手不吝赐教。。。3Q...
请教为什么报错?
AnsiString a;rna = "jfle"+"jflee";rnrnrn<em>为什么</em>报“invalid point addition”?
为什么报错呀?
select * from swlh_identify_code t;rninsert into t MOBILE_PHONE values (2222222);
[求助]为什么报错!?
private void btn_submit_Click(object sender, System.EventArgs e)rn rn string txt_smallclass11 = ddl_smallclass.SelectedItem.Value;rn if(txt_smallclass11 != null || txt_smallclass11.ToString() != "")rn rn。。。。。rnrn以上是我写的一个方法,可是却<em>报错</em>rn-----------------------rn未将对象引用设置到对象的实例。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。rnrn源错误: rnrnrn行 121: ddl_smallclass.Enabled = true;rn行 122: rn行 123: string txt_smallclass11 = ddl_smallclass.SelectedItem.Value;rn行 124: if(txt_smallclass11 != null || txt_smallclass11.ToString() != "")rn行 125: rn rnrnrnrnrn请问是什么情况????????rnrn请问是什么情况????????rnrn请问是什么情况????????
搞不懂了,为什么报错???
winName="aa"rnupname="aa"rndownname="bb"rncash=1000rnhavcash=5000rnrn blog="投注"&upName&"VS"&downName&"的比赛,让("&caseLet&"),压"rn blog=blog&winName&"。投注金额"&cash&"盎司,账户上剩余现金"&haveCash-cash*1.02&"盎司。"rnresponse.Write blogrnrnrn出现错误提示:rnMicrosoft VBScript 编译器错误 错误 '800a0401' rnrn语句未结束 rnrn/test.asp,行18 rnrnblog=blog&winName&"。投注金额"&cash&"盎司,账户上剩余现金"&haveCash-cash*1.02&"盎司。"rnrnrn怎么回事啊???谁能指点一下?
求助!为什么报错
CREATE TABLE accessrulesdata (rn pK int(11) NOT NULL DEFAULT '0',rn accessRule varchar(250) binary NULL DEFAULT NULL,rn rule int(11) NOT NULL DEFAULT '0',rn isRecursive tinyint(4) NOT NULL DEFAULT '0',rn `AdminGroupData_accessRules` int(11) NULL DEFAULT NULL,rn PRIMARY KEY (pK)rn);rnrn 'binary' 附近有语法错误。
我这段程序为什么报错呢?
代码如下:rn[code=PHP]rnalert('登陆信息填写不完整!请返回重新填写!');history.go(-1);";rn exit;rn rn if ($vertifycode != $_SESSION['VCODE'])rn rn echo " ";rn exit;rn rn $sql = "select * from Admin where name = '".$username."' and password = '".md5($password)."'";rn $result = mysql_query($sql);rn $counts = mysql_num_rows($result); rn if ($counts == 0 )rn rn echo " ";rn exit;rn else rn header('location:index.php');rn $_SESSION['username'] = $username;rn rnrn?>rn[/code]rn错误如下:rnrn[size=14px][color=#FF0000]Warning: Cannot modify header information - headers already sent by[/color][/size]rnrn
看看这段程序为什么报错
void test(char *test)rnrnchar *temp=new char;rntemp=test;rnrnchar result=Move(temp);rndelete temp;//这里报内存错误rnrnrnrnLPSTR Move(LPCTSTR lpText)rnrn char *tmp=new char[100];rn for(int i=0;i<100;i++)rn rn tmp[i*2]=lpText[i*2+1];rn tmp[i*2+1]=lpText[i*2];rn rn return tmp;rnrn
这个程序在openGL中为什么报错
rn/*rn * clip-origon.crn * This program clips the line with the given window.rn */rn#include rn#include rn#include rn#include rn#include rn#include rnrnfloat xa,xb,ya,yb;rnrnvoid myinit(void)rnrn glShadeModel (GL_FLAT);rn glClearColor (0.0, 0.0, 0.0, 0.0);rnrnrnvoid display(void)rnrn glClear(GL_COLOR_BUFFER_BIT);rn// The windowrn// ------------------------------------rn// you can change the window definition certainly.rn// ------------------------------------rn glColor4f (0.0, 1.0, 1.0, 0.75);rn glBegin(GL_POLYGON);rn glVertex2f( 0.2f, 0.3f); // Bottom Leftrn glVertex2f( 0.8f, 0.3f); // Bottom Leftrn glVertex2f( 0.8f, 0.7f); // Bottom Rightrn glVertex2f( 0.2f, 0.7f); // Bottom Rightrn glEnd();rn// ------------------------------------rn// please draw your origonal line and the clipped rn// line here with different color and line widthrn// ------------------------------------rn glColor4f (1.0, 0.0, 0.0, 0.75);rn glBegin(GL_LINES);rn glVertex2f(xa,xb);rn glVertex2f(ya,yb);rn glEnd(); rnrn clipLine(xa,xb,ya,yb,0.2,0.3,0.7,0.8);rnrn glColor4f (1.0, 0.0, 0.0, 1); rn glBegin(GL_LINES);rn glVertex2f(xa,xb);rn glVertex2f(ya,yb);rn glEnd(); rn glFlush();rnrnrnrnrnint clipTest(float p,float q,float &u1,float &u2)rnrn float r;rn int retval=1;rn if(pu2)rn retval=0;rn elsern if(r>u1)rn u1=r;rn rn elsern if(p>0.0)rn rn r=q/p;rn if(r0.0)rn rn xa+=u1*dx;rn ya+=u1*dy;rn rn rn rnrnrn/* Main Looprn * Open window with initial window size, title bar, rn * RGBA display mode, and handle input events.rn */rnint main(int argc, char** argv)rnrn glutInit(&argc, argv);rn glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);rn //define size and the relative positon of the applicaiton window on the displayrn glutInitWindowSize (500, 500); rn glutInitWindowPosition (100, 100);rn //init the defined window with "argv[1]" as topic showed on the top the windowrn glutCreateWindow (argv[0]);rn // opengl setuprn myinit ();rn //-------------------------------rn //please define your own line segment and use rn //cohen-sutherland algorithm to do the clipping in myclip() funtion rn //-------------------------------rn cout<<>xa>>xb>>ya>>yb;rn rn //define callbacksrn glutDisplayFunc(display); rn glutReshapeFunc(myReshape);rn //enter the loop for displayrn glutMainLoop();rnrn return 1;rnrn
以下这段程序报错为什么
package sks;rnimport java.io.PrintStream;rnimport java.sql.*;rnimport java.util.*;rnpublic class ConnBeanrnrnrn public ConnBean()rn rn sDBDrive = "com.microsoft.jdbc.sqlserver.SQLServerDriver";rn sDBSource = "jdbc:microsoft:sqlserver://DOLPHIN(Windows NT);DatabaseName=sks;User=sa;Password=''";rn conn = null;rn stmt = null;rn rs = null;rn tryrn rn Class.forName(sDBDrive);rn rn catch(ClassNotFoundException classnotfoundexception)rn rn System.err.println("ConnBean():".concat(String.valueOf(String.valueOf(classnotfoundexception.getMessage()))));rn rn tryrn rn conn = DriverManager.getConnection(sDBSource);rn stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);rn rn catch(SQLException sqlexception)rn rn System.err.println("ConnBean():".concat(String.valueOf(String.valueOf(sqlexception.getMessage()))));rn rn rnrn public ResultSet executeQuery(String s)rn rn rs = null;rn tryrn rn rs = stmt.executeQuery(s);rn rn catch(SQLException sqlexception)rn rn System.err.println("executeQuery:".concat(String.valueOf(String.valueOf(sqlexception.getMessage()))));rn rn return rs;rn rnrn public void executeUpdate(String s)rn rn tryrn rn stmt.executeUpdate(s);rn rn catch(SQLException sqlexception)rn rn System.err.println("executeUpdate:".concat(String.valueOf(String.valueOf(sqlexception.getMessage()))));rn rn rnrn String sDBDrive;rn String sDBSource;rn Connection conn;rn Statement stmt;rn ResultSet rs;rn public static void main(String[] args)throws Exception rn tryrn rn String sql;rn ResultSet rs;rn sql="select * from CustomRecord where KHBH=2";rn ConnBean conn=new ConnBean();rn rs=conn.executeQuery(sql);rn while(rs.next())rn rn System.out.print(rs.getString("KHBH"));rn rn catch(Exception e)rn System.out.print(e.getMessage());rn rn rnrnrn报出来是ConnBean():com.microsoft.jdbc.sqlserver.SQLServerDriverrnConnBean():No suitable driverrnnullPress any key to continue...rnrn<em>为什么</em>?怎样可以解决?
我的程序为什么报错堆栈溢出
我的<em>程序</em>用的是delphi,用ado连接数据库的rn在本地一点问题都没有rn可是,到别人的机器上就会<em>报错</em>rn说堆栈溢出rn那位大虾给我点意见,从那里开始检查rn谢了rn
一个DEMO小程序 为什么报错
public class Demo04 rn /*rn * 类名;Demo04rn * rn * 创建日期:20120909rn * rn * 描述:逻辑运算符的使用:&&且;||或;!真假rn * rn * rn * */rn public static void main(String[] args)rn int score1=100;rn int score2=72;rn if((score1>90&&score2>80)||(score1=[u]100&&score2>70[/u]))rn System.out.println("师傅说:干的不错");rn rn rnrnrn<em>报错</em>是在有下划线的那部分;提示是未对参数类型 int boolean定义运算符&& 哪位先知 能给我讲讲这是什么意思吗?那<em>为什么</em>前面的那一个运算符就不会<em>报错</em>呢?
一个DatagramSocket程序为什么报错
import java.net.*;rnimport java.io.*;rnpublic class Sender rn public static void main (String args[]) throws IOException rn //判断命令行参数是否符合要求 rn if (args.length != 2) rn System.out.println("Usage:java Sender "); rn return; rn rn //发送缓冲区 rn byte sBuf[] = new byte[100]; rn System.out.println("Give the message you’ll send," + "up to 100 bytes, ending with #"); rn DataInputStream dataIn = new DataInputStream(System.in); rn int i; rn //读取键盘输入,存入缓冲区 rn for (i = 0; i < 100; i++) rn byte inByte = dataIn.readByte(); rn if ((char)inByte == '#') break; rn sBuf[i] = inByte; rn rn //创建数据报套接字 rn DatagramSocket sendSocket = new DatagramSocket(); rn //创建一个数据报 rn Datagrampacket packet = new Datagrampacket(sBuf,i,InetAddress.getByName(args[0]),Integer.valueOf(args[1].intValue())); rn //发送 rn sendSocket.send(packet) ; rn //关闭 rn sendSocket.close(); rn rn
这样的程序设置为什么报错
请问以下<em>程序</em>执行时<em>为什么</em>会<em>报错</em>?(提示对话框:无效的目录和路径)如何使我定义的目录和路径不随存储的计算机的目录和路径的改变而改变呢?另外,<em>为什么</em>这个<em>程序</em>只能查找一个库房号,下一个查找却不行了呢?rnrnset talk offrnPUBLIC LCSys16,LCNowpath rnLCSys16=SYS(16) rnLCNowpath=LEFT(LCsys16,RAT("\",LCSys16,1)) rnset default to "&LCNowpath" rnrnselect 凭证库.档案号,凭证库.凭证题名,位置库.库房号;rnfrom 财务凭证!凭证库,财务凭证!位置库;rnwhere 凭证库.档案号=位置库.档案号;rnorder by 凭证库.档案号;rninto table new.dbfrnuse newrnlocate all for 档案号=alltrim(thisform.text1.value)rnif found()rn select 库房号 from new into array Afieldvaluern thisform.text2.value=alltrim(Afieldvalue)rnendifrncontinuernclose database rnset talk on
程序会在哪报错
#includernusing namespace std;rntypedef structrn int i;rn int *p;rnS;rn void main()rn rn S s;rn cout<
为什么程序会崩溃
void getMemory(char *p)rnrn p = new char[100]; rnrnvoid test()rnrn char *str = NULL;rn getMemory(str);rn strcpy(str,"helloword");rn cout<
这段C程序为什么会有错?
#includernvoid pt(char *string)rn char *str=string;rn if(*str=='\0') return;rn while(*str) str++;rn --str;rn printf("%c",*str);rn *str='\0';rn pt(string);rnrnvoid main()rn pt("student");rnrnrn是将student单词逆序排出的~
为什么这个C程序会无休止循环?
#include "stdio.h"rnmain()rnrn char string[]="china";rn char i=0;rn for(i=0;i,string,i); rn getch();rnrn<em>为什么</em>i值增加到127后,又从-128起开始无休止循环,i=127后,<em>程序</em>还会执行i++吗?
麻烦看下,为什么报错
[code=Java][/code]rnpackage No2;rnimport java.util.*;rnimport java.io.*;rnpublic class Test rn public static void main(String[] args)throws IOExceptionrn rn HashMap hm=new HashMap();rn Child ch1=new Child("SN02312","谢谢");rn Child ch2=new Child("SN0232314124122","小小");rn hm.put("SN02312","谢谢");rn hm.put("SN0232314124122","小小");rn //遍历1rn /* rn if(hm.containsKey("SN02312"))rn rn System.out.println("有");rn Child temp=(Child)hm.get("SN02312");rn System.out.println("name="temp.getName+" "+"num="+temp.getNum);rn elsern rn System.out.println("没有");rn rn rn rnrnclass Childrnrn public String getName() rn return name;rn rn public void setName(String name) rn this.name = name;rn rn public String getNum() rn return num;rn rn public void setNum(String num) rn this.num = num;rn rn String name;rn String num;rn public Child(String num,String name)rn rn this.name=name;rn this.num=num;rn rnrnrnrnrnrnrn<em>程序</em><em>报错</em>:rnException in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to No2.Childrn at No2.Test.main(Test.java:28)rnrnrn<em>为什么</em>这里不能转成String ?麻烦给个比较详细的解答,查了好久...rn
简单使用assert 为什么报错
#includern#includernrnusing namespace std;rnrnint main()rnrn int i=1;rnrn assert(i>2);rnrn return 0;rnrnrn就是这一点 执行assert(i>2)就会<em>报错</em> 不知道<em>为什么</em>
编译器为什么报错呢?
#includern#define STARS **************************rnrnintrnmain(void)rnrn printf("\n%s%s\n",STARS,STARS);rn return 0;rnrnrn出现错误a.cpp:7: error: syntax error before `,' tokenrn我用的是MinGWStudio,<em>为什么</em>会<em>报错</em>呀
求解为什么会闪退报错
#include rn#includernconst int SIZE = 20;rnusing namespace std;rnrnclass Cd rnrnprivate:rn char* performers;rn char* label;rn int selections; //曲目数rn double playtime; //播放时间rnpublic:rn Cd(const char * s1, const char * s2, int n, double x);rn ~Cd();rn virtual void Report() const; // 显示CD所有数据rn;rnrnCd::Cd(const char * s1 = new char[SIZE], const char * s2 = new char[SIZE], int n=0, double x=0.0)rnrn strcpy_s(performers,222,s1);rn strcpy_s(label,222,s2);rn selections = n;rn playtime = x;rnrnrnvoid Cd::Report() constrnrn cout << performers << ", " << label << ", " << selections << ", " << playtime << endl;rnrnrn/**************************************************************/rnclass Classic :public Cdrnrnprivate:rn char* performers;rn char* label;rn char* symple;rn int selections; //曲目数rn double playtime; //播放时间rnpublic:rn Classic(const char * s1, const char * s2, const char * s3, int n, double x);rn virtual void Report() const;rn char primarywork();rn;rnrnClassic::Classic(const char * s1 = new char[SIZE], const char * s2 = new char[SIZE], const char * s3 = new char[SIZE], int n=0, double x=0.0)rnrn strcpy_s(performers, 222, s1);rn strcpy_s(label, 222, s2);rn strcpy_s(symple, 222, s3);rn selections = n;rn playtime = x;rnrnrnvoid Classic::Report() constrn rn cout << performers << ", " << label << ", " << symple << ", " << selections << ", " << playtime<< endl;rnrnrnchar Classic::primarywork()rnrn char message;rn cout << "please input the message of the CD('q' is QUIT):" << endl;rn cin >> message;rn while (message =='q')rn rn cout << message;rn rn return message;rnrnrnrn/**************************************************************/rnrnvoid Bravo(const Cd & disk);rnrnint main()rnrn Cd c1("Beatles", "Capitol", 14, 35.5);rn Classic c2 = Classic("Piano Sonata in B flat, Fantasia in C", "Alfred Brendel", "Philips", 2, 57.17);rn Cd *pcd = &c1;rn cout << "Using object directly:\n";rn c1.Report();rn c2.Report();rn cout << "Using type cd * pointer to objects:\n";rn pcd->Report();rn pcd = &c2;rn pcd->Report();rn cout << "Calling a function with a Cd reference argument:\n";rn Bravo(c1);rn Bravo(c2);rnrnrn system("pause");rn return 0;rnrnrnvoid Bravo(const Cd & disk)rnrn disk.Report();rnrnrnrn求解决办法
为什么p->id会报错
scanf("%s%d",p->name,&p->id); rn<em>为什么</em>p->id<em>报错</em>,要用&p->id而p->name却可以?rn rn#include rnstruct userrnrnint id;rnchar name[50];rn u; rnchar c;rnstruct user *p; rnrnint main()rnp=&u;rnprintf("请您输入姓名:\n");rnscanf("%s%d",p->name,&p->id); rnprintf("%s\t%d\n",p->name,p->id);rnprintf("\nID:%d\n",(&u)->id);rnreturn 0;rnrn
这句脚本为什么报错
html脚本中定义一变量并赋值 var getname=rn<em>为什么</em> myname值为整型是不<em>报错</em>,而是字条串是就<em>报错</em>呀,那该怎么样赋字符串值呀
请教:request,为什么报错
String handphone=request.getParamerter("handphone");rn开始执行页面时是空值,一面中有个表单提交,提交到本页后,handphone才有值rn执行页面时报如下的错:rnorg.apache.jasper.JasperException: Unable to compile class for JSPrnrnAn error occurred at line: -1 in the jsp file: nullrnrnGenerated servlet error:rn [javac] Since fork is true, ignoring compiler setting.rn [javac] Compiling 1 source filern [javac] Since fork is true, ignoring compiler setting.rn [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\jsp\duanxin\forget_pass_jsp.java:75: cannot resolve symbolrn [javac] symbol : method getParamerter (java.lang.String)rn [javac] location: interface javax.servlet.http.HttpServletRequestrn [javac] handphone=request.getParamerter("handphone");rn [javac] ^rn [javac] 1 error
为什么这样写会报错
我写了一个类来读取.config文件,文件的格式是key=value这样,比如rnaaa=bbbrnrnccc=222rnrn但是在hashmap.put的时候报空指针的错误rn[code=Java]rnpackage cf.sys;rnrnimport java.io.BufferedReader;rnimport java.io.File;rnimport java.io.FileReader;rnimport java.io.IOException;rnimport java.util.ArrayList;rnimport java.util.HashMap;rnimport java.util.Iterator;rnimport java.util.List;rnrnpublic class InitialArgument rn private static HashMap args;rn rn private String configPath=System.getProperty("user.dir")+"\\.config";rn rn rn public InitialArgument()rn rn insertIntoHashMap(ReturnArray(ReadFile(configPath)));rn rn rn rn public void insertIntoHashMap(List alist) rn rn String str;rn int e;rn Iterator it=alist.iterator();rn while(it.hasNext())rn rn str=(String)it.next();rn e=ReturnEqual(str);rn if(e);//[color=#FF0000]这句话报空指针错误[/color]rn rn rn public int ReturnEqual(String str) //返回“=”的下标rn rn rn int e;rn for(int i=0;i
为什么Web引用会报错
我用C# 在创建Web引用时(URL:http://www.api-in-the-sky.com/flightinfo/location.asmx)遇到如下<em>报错</em>:rnrnServer Error in '/flightinfo' Application.rn--------------------------------------------------------------------------------rnrnConfiguration Error rnDescription: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. rnrnParser Error Message: File or assembly name System.Web, or one of its dependencies, was not found.rnrnSource Error: rnrnrnLine 69: rnLine 70: rnLine 71: rnLine 72: rnLine 73: rn rnrnSource File: c:\inetpub\wwwroot\flightinfo\web.config Line: 71 rnrnAssembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web' could not be loaded.rnrnrn=== Pre-bind state information ===rnLOG: DisplayName = System.Webrn (Partial)rnLOG: Appbase = file:///c:/inetpub/wwwroot/flightinfornLOG: Initial PrivatePath = binrnCalling assembly : (Unknown).rn===rnrnLOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).rnLOG: Post-policy reference: System.WebrnLOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3427/Temporary ASP.NET Files/flightinfo/8c966ccd/97a2cbc7/System.Web.DLL.rnLOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3427/Temporary ASP.NET Files/flightinfo/8c966ccd/97a2cbc7/System.Web/System.Web.DLL.rnLOG: Attempting download of new URL file:///c:/inetpub/wwwroot/flightinfo/bin/System.Web.DLL.rnLOG: Attempting download of new URL file:///c:/inetpub/wwwroot/flightinfo/bin/System.Web/System.Web.DLL.rnLOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3427/Temporary ASP.NET Files/flightinfo/8c966ccd/97a2cbc7/System.Web.EXE.rnLOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3427/Temporary ASP.NET Files/flightinfo/8c966ccd/97a2cbc7/System.Web/System.Web.EXE.rnLOG: Attempting download of new URL file:///c:/inetpub/wwwroot/flightinfo/bin/System.Web.EXE.rnLOG: Attempting download of new URL file:///c:/inetpub/wwwroot/flightinfo/bin/System.Web/System.Web.EXE.rnrn rnrnrn--------------------------------------------------------------------------------rnVersion Information: Microsoft .NET Framework Version:1.0.3427.0; ASP.NET Version:1.0.3427.0 rnrnrn那位知道是怎么回事?分数好商量!
大家看看为什么报错
CREATE OR REPLACE TRIGGER tr_checkrnBEFORE INSERT ON Shelf_Reading FOR EACH ROW WHEN(new.readpointID=004 or new.readpointID=005)rnDECLARErn v_eventID1 NUMBER;rn v_eventID2 NUMBER;rnBEGINrn SELECT max(eventID) INTO v_eventID1 from checkout;rn if v_eventID1 is null thenrn v_eventID2:=1;rn elsern set v_eventID2:=v_eventID1+1;rn end if;rn INSERT INTO checkout VALUES(:v_eventID2,001,:new.readpointID,005,003,:new.epc,0.8,005,sysdate,sysdate);rn UPDATE Voc_epcobjectrn SET statu='已售'rn WHERE ecp=new.epc;rnEND tr_check;rn/rn报的错rn9/6 PL/SQL: SQL Statement ignoredrn9/10 PL/SQL: ORA-00922: 选项缺失或无效rn11/31 PLS-00049: 错误的赋值变量 'V_EVENTID2'
为什么 ExtendedStatus On 这一句会报错?????????
为了安装mod_limitipconn模块,我把ExtendedStatus On 前面的#去掉,结果启动Apache 时就<em>报错</em>,哪位大侠指点一下。
这个存储过程为什么报错
CREATE PROCEDURE sp_Pub_RecordCountrnrn (rn @Tbname nvarchar(100)rn )rnrnASrnSELECT COUNT(*) AS RecordCount FROM @Tbnamernrn<em>报错</em>:必须声明变量@Tbnamern这是<em>为什么</em>呀??
为什么这段代码会报错。。。。
[code=c]#include rn//提供一个Unload函数用于内核<em>程序</em>的卸载rnVOID DriverUnload(PDRIVER_OBJECT driver)rnrn DbgPrint("Our driver is unloading...\r\n");rnrn//DriverEntry入口函数,相当于mainrnNTSTATUS DriverEntry(PDRIVER_OBJECT driver,PUNICODE_STRING reg_path)rnrn //人为设置一个断点用于调试。rn //宏DBG保证只有调试版本才执行这条语句。rn#if DBGrn _asm int 3rn#endifrn//下面是<em>报错</em>的地方rn//我就是想得到当前调用内核模块的进程的PIDrn//写成ULONG也会<em>报错</em>,ULONG i; i=ULONG(PsGetCurrentProcessId());这样也<em>报错</em>rn int i;rn i=int(PsGetCurrentProcessId());rn //设置一个卸载函数rn driver->DriverUnload=DriverUnload;rn return STATUS_SUCCESS;rn[/code]rnrnXP系统,用WDK的build编译。
求助(连接数据库)为什么报错
jdbc-odbc驱动加载成功rn数据库连接成功rnException in thread "main" java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。rn at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)rn at FoundDemoAccess.main(FoundDemoAccess.java:14)rnrnimport java.sql.*;rnpublic class FoundDemoAccessrnrn public static void main(String[] args) throws Exceptionrn rn String url = "jdbc:odbc:studentsAccess";rn Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");rn System.out.println("jdbc-odbc驱动加载成功");rn Connection conn = DriverManager.getConnection(url, "", "");rn System.out.println("数据库连接成功");rn Statement stmt = conn.createStatement();rn String sql = "select 编号, 学号, 姓名, 性别, 班级 from studentbase";rn ResultSet rs = stmt.executeQuery(sql);rn while(rs.next())rn rn System.out.println(rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4));rn rn rs.close();rn conn.close();rn rn
报错?">为什么request.getParameter("uid") 会报错
问个问题rn" method="post">rn这样<em>为什么</em>会报 equal symbol expected错误?而换成就没错,这是什么原因啊?应该如何改?
为什么update 语句会报错
有谁能帮帮我,我用adoquery做update功能rn with adoquery1 dorn beginrn close;rn sql.Text:='update ftuser set deleteflag =Y where userid='''+user+'''';rn SHOWMESSAGE(SQL.TEXT);rn execsql;rn end;rndeleteflag为char rn但是运行后<em>报错</em>,错误是列明Y无效。到底该怎么改rn
这个为什么报错呢?
vector::const_reverse_iterator rev_begin=ivec.rbegin(),rev_end=ivec.rend();rnrn而改成rnvector::reverse_iterator rev_begin=ivec.rbegin(),rev_end=ivec.rend();rn就对了呢?rn<em>为什么</em>呢?rnrnrnivec是一个vector
报错?">为什么mysql_connect("127.0.0.1")会报错
错误是:Fatal error: Call to undefined function mssql_connect() in E:\php\index.php on line 76 rn我刚入门,希望各位武林豪杰多多指教。先有两问:rn 1 PHP怎么连接SQL server ,Access,MySql等数据库?rn 2 在apache配置了虚拟目录,<em>为什么</em>无法访问?
为什么DBGridEh1.FrozenCols:=2;会报错?
第一次正常,rn但是再次调用initDBGridEh时,提示'List index out of bounds(2)'rnrnprocedure TForm1.FormShow(Sender: TObject);rnbeginrninitDBGridEh;rnDBGridEh1.FrozenCols:=2;rnend;rnrnprocedure TForm1.initDBGridEh();rnbeginrnwith ADOQuery1 dornbeginrnclose;rnsql.clear;rnsql.add(sqlStr);rnopen;rnfor i:=0 to FieldCount-1 dornbeginrnFields[i].Visible:=False; //调试发现在这边<em>报错</em>,怎么解决呢?rnend;rnFieldByName('Code').Visible:=True;rnend;rnrn因为是要先把字段隐藏的rn
为什么会不停在报错
我的<em>程序</em>没有问题,每用一次变量就会报一次错!rn例如我写的是:rnrn报第三行的错,错误如下:rnNotice: Undefined variable: requestaction in d:www\setup.php on line 2rn这是什么原因啊!
为什么报错啊?晕
rn
这种写法为什么报错
[code=JScript]rn function Odemo(name)rn rn this.name1=name;rn rn rn var b=new Odemo('bbb');rn alert(b.name1); //显示bbbrn rn var b=new Odemo();rn alert(b('bbb').name1); //IE下<em>报错</em>-缺少函数,火狐下<em>报错</em>b is not a functionrn[/code]rnrn求指点。。。。。。。。rn谢谢
C# ForEach为什么报错
下面这段代码在 prizeGroup.ForEach(delegate(var item)这个地方<em>为什么</em>会提示无法从匿名方法转换为System.Action的错误,应该怎么改正呢?rn没有币了,哪位大哥哥,指点一下喽,小女子在这先谢谢啦!rnvar prizeGroup = prizeDetailCollection.GroupBy((T_PrizeDetail m) => m.UserId, (Guid key, IEnumerable c) => newrnrnKey = key,rnC1 = c.Sum((T_PrizeDetail n) => n.Currency_1),rnC2 = c.Sum((T_PrizeDetail n) => n.Currency_2) + c.Sum((T_PrizeDetail n) => n.Currency_10)rn).ToList();rnint index = 0;rn prizeGroup.ForEach(delegate(var item)rn rnrn if (item.C1 > 0m)rn rnrn rn if (item.C2 > 0m)rn rnrn rnrn );
ionic2 存储数据为什么报错
下面是我写的 代码,运行时 就会 <em>报错</em>。求解答。rnrnrnimport Component from '@angular/core';rnrnimport NavController , NavParams , Page , Storage , LocalStorage from 'ionic-angular';rnrnrnimport AboutPage from '../about/about';rnrn@Component(rn selector: 'page-home',rn templateUrl: 'home.html'rn)rnexport class HomePage rn data: any;rn local: Storage;rn constructor(public navCtrl: NavController,public navParams: NavParams) rn this.data = navParams.get('item1');rn // 设置并存储isLogin的值rn this.local = new Storage(LocalStorage);rn this.local.set('isLogin',false);rn rn // 跳转方法rn openMenu()rn this.navCtrl.push(AboutPage,rn item1:'ios-newPage'rn )rn rn // 判断登陆用户输入的内容rn login()rn if(this.phone == null || this.phone == undefined)rn alert("手机号不能为空");rn return false;rn rn if(this.password == null || this.password == undefined) rn alert("请输入密码");rn return false;rn rn rn // 获取isLogin的值rn getLocalData()rn this.local.get('isLogin').then((result) => rn alert("isLogin = " + result);rn )rn rnrnrnrnrn
简单的代码为什么报错
在查询数据库代码如:rnwhile(rs.next())rnrs.getString(3);rnout.print(rs.getString(1));rnrn就这<em>报错</em>,说是第一字段出错,如果是先查的rs.getString(1),就不会<em>报错</em>,请问是什么原因啊?
为什么这段代码会报错
#includernint main()rnrn using namespace std;rn int higgens=5;rn int* p_higgens=&higgens;rn int* pt;rn pt=(int*)0012FF7C;rn cout<<
为什么报错,在线等!!!
我在一对话框应用<em>程序</em>中有二个RICH和一个LIST,目的是在窗口大小改变后,这三个控件大小也随之改变,<em>程序</em>如下:rnvoid CNQCDlg::OnSize(UINT nType, int cx, int cy) rnrn CDialog::OnSize(nType, cx, cy);rn rn // TODO: Add your message handler code herern RECT pRect,pInfo,pSend,pList;//第二、三个为RICH,第四个为LISTrn this->GetClientRect(&pRect);rn pInfo.left=pRect.left;rn pInfo.top=pRect.top;rn pInfo.bottom=(pRect.bottom-pRect.top)*6/10;rn pInfo.right=(pRect.right-pRect.left)*6/10;rn pSend.top=pInfo.bottom+50;rn pSend.right=pInfo.right;rn pSend.bottom=pRect.bottom;rn pSend.left=pRect.left;rn pList.left=pInfo.right+2;rn pList.bottom=pRect.bottom;rn pList.right=pRect.right;rn pList.top=pRect.top;rn //以下m打头的变量为三个控件变量rn m_pInfo.MoveWindow(&pInfo,TRUE);//这以下三个会<em>报错</em>rn m_pSend.MoveWindow(&pSend,TRUE);//说什么winocc.cpp的279行出错!rn m_pUser.MoveWindow(&pList,TRUE);//<em>为什么</em>?rnrnrn
为什么我的nextInt会报错??
public class Scanner rn rnrn public static void main(String[]args)rn Scanner scanner= new Scanner();rn rn System.out.print("请输入学生年龄:");rn int ageOfStudent = scanner.nextInt();rn System.out.println("该生是否满18岁?"+rn (ageOfStudent>=18?"yes":"no"));rn rn rn
为什么下面的语句会报错???
update canshu rnset value= :canshutime.sle_ts1.textrnwhere name="ts1start"rnusing sqlca;rnrncanshu是个参数表,value和name都是varchar类型,rn数据库为access 2000rn错误为:datadasec0038:sqlstate=37000 Access的update语法错误???
为什么这个progressDialog会报错
![![图片说明](https://img-ask.csdn.net/upload/201703/27/1490599294_571796.png)图片说明](https://img-ask.csdn.net/upload/201703/27/1490599288_577479.png)
为什么dropdpwnlist的时候会报错···
绑定的时候就<em>报错</em>:databind:“system。String”不包含名为“aa”的属性rnrnvar a =from b in XX select b.idrnDropDownList1.DataSource=a;rnDropDownList1.DataTextField = "aa"; rnDropDownList1.DataBind();rnrn就会<em>报错</em>···说找不到···那个属性···求大牛给解释···
为什么这段代码会报错
CREATE DATABASE Xihuanrn ONrn --PRIMARYrn (NAME = Xinhua1,rn FILENAME = 'D:Xinhua\Xinhua1.mdf',rn SIZE = 3MB,rn MAXSIZE = 10MB,--UNLIMITED 不受限制rn FILEGROWTH = 15%,rn ) ,rnrn (NAME = Xinhua2,rn FILENAME = 'D:\Xinhua\Xinhua.ndf',rn SIZE = 2MB,rn MAXSIZE = 15MB,rn FILEGROWTH =2MB,rn )rn rn LOG ONrn (NAME = Xinhua,rn FILENAME = 'D:\DATA\Xinhualog.LDF',rn SIZE = 500KB,rn MAXSIZE = UNLIMITED,rn FILEGROWTH = 500KBrn )
为什么new的动态数组会报错
我的<em>程序</em>顺序执行到某个函数时需要new一个大数组,我使用的是动态new出这个数组,例如p=new int 【1亿】,int *p定义在类的成员变量里面。我可以确定不是内存不够用,因为我如果在<em>初始</em>化类的时候就new这个大数组,<em>程序</em>是可以跑完了。而如果一开始就new这个大数组就浪费内存了,所以我在需要这个数组的时候才new,<em>为什么</em>就<em>报错</em>??我觉得好奇怪??求救,我的内存有4G
为什么这样也会报错????
rnrnrn rn rn rnrnrnrn rnrnrn我想用变量"k"来接收服务器端 “jj”的值 我改了半天<em>程序</em>都没改出来rn请众大狭帮帮忙 rn 谢谢rn
这段代码为什么报错?
#include rnrnrnint main(void)rn char inArr[] = "hello","world";rn printf("%s",inArr[0]);rn rnrn
为什么连接数据库驱动会报错
[img=http://img.my.csdn.net/uploads/201205/10/1336623915_1341.jpg][/img]rn如题,如图。跪求解答,感激不尽。
为什么int(12,16)会报错
[code=Python]rn>>> int (12,16)rnrnTraceback (most recent call last):rn File "", line 1, in rn int (12,16)rnTypeError: int() can't convert non-string with explicit basern[/code]rnrn函数int(obj,base = 10),这样用应该没错的啊?rnrn哪位大大能稍微讲解下
为什么使用okhttp3.0会报错
Process: employ.employhelp, PID: 9221rn java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/OkHttpClient;rn at employ.employhelp.utils.OkHttpUtils.(OkHttpUtils.java:44)rn at employ.employhelp.utils.OkHttpUtils.getInstance(OkHttpUtils.java:38)rn at employ.employhelp.utils.OkHttpUtils.postAsync(OkHttpUtils.java:202)rn at employ.employhelp.model.LoginModel.login(LoginModel.java:27)rn at employ.employhelp.controller.LoginController.onClick(LoginController.java:54)rn at android.view.View.performClick(View.java:5646)rn at android.view.View$PerformClick.run(View.java:22458)rn at android.os.Handler.handleCallback(Handler.java:761)rn at android.os.Handler.dispatchMessage(Handler.java:98)rn at android.os.Looper.loop(Looper.java:156)rn at android.app.ActivityThread.main(ActivityThread.java:6524)rn at java.lang.reflect.Method.invoke(Native Method)rn at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)rn at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)rn Caused by: java.lang.ClassNotFoundException:[color=#FF0000] Didn't find class "okhttp3.OkHttpClient" on path[/color]: DexPathList[[dex file "/data/data/employ.employhelp/files/instant-run/dex/slice-support-annotations-23.2.1_905ef255c5b6eac04e23e8ec109904f00fdf0f0f-classes.dex"rnrnrn我使用的环境是android studiorn我使用complie来导入后运行时这个错误,将jar文件放在lib中也会产生这种错误。rn网上有人说是冲突了,但是我只导入了一次,也清理了。<em>为什么</em>会报这样的错?请大神们指点
为什么 *p = *q 会报错???
如题,在VC6.0里面有如下<em>程序</em>:rnrnvoid main()rnrn char* p = "12345";rn char* q = "abcdef";rnrn *p = *q; // 这里<em>报错</em> access violationrnrnrn请问高手这是<em>为什么</em>?
AnimationLayout控件动画效果下载
实现控件的隐藏和显示动画,多种动画选择! 可使用XMl或者代码实现! 相关下载链接:[url=//download.csdn.net/download/qiujuer/6934243?utm_source=bbsseo]//download.csdn.net/download/qiujuer/6934243?utm_source=bbsseo[/url]
gcc-4.4.7-11.el6.x86_64.rpm下载
gcc-4.4.7-11.el6.x86_64.rpm 相关下载链接:[url=//download.csdn.net/download/fjnocliuzm/8512527?utm_source=bbsseo]//download.csdn.net/download/fjnocliuzm/8512527?utm_source=bbsseo[/url]
单片机开发板原理图下载
单片机开发板原理图,AT89S51单片机。 相关下载链接:[url=//download.csdn.net/download/u010966799/7955559?utm_source=bbsseo]//download.csdn.net/download/u010966799/7955559?utm_source=bbsseo[/url]
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池
我们是很有底线的