AnnotatedElement.getAnnotation()方法为什么会编译出错呢? [问题点数:100分]

Bbs1
本版专家分:0
结帖率 0%
Bbs9
本版专家分:68012
Blank
GitHub 绑定GitHub第三方账户获取
Blank
红花 2011年6月 Java大版内专家分月排行榜第一
Blank
黄花 2019年3月 Java大版内专家分月排行榜第二
Blank
蓝花 2019年7月 其他开发语言大版内专家分月排行榜第三
2018年11月 Java大版内专家分月排行榜第三
2012年7月 Java大版内专家分月排行榜第三
2011年11月 Java大版内专家分月排行榜第三
2007年12月 Java大版内专家分月排行榜第三
2007年10月 Java大版内专家分月排行榜第三
Bbs1
本版专家分:0
为什么编译出错
下面这段程序<em>为什么</em>会<em>编译出错</em>啊?rn#define WIN32_LEAN_AND_MEANrn#include rn#include rn#include rn#include rn//#include "MtVerify.h"rn//#include rnrnrn//DWORD ThreadFunc(LPVOID);rnDWORD WINAPI ThreadFunc(LPVOID n)rnrnint i;rnint inside=0;rndouble val;rnrnsrand((unsigned)time(NULL));rnrnfor(i=0;i,rn elapsed/1000,elapsed%1000);rnCloseHandle(hThrd);rnrnreturn EXIT_SUCCESS;rnrn
为什么g++下编译出错呢?
[code=C/C++]#include rnusing namespace std;rnrnint count;rnint list[1000];rnrnvoid comb(int m, int k);rnrnint main()rnrn int m, k;rn cin >> m >> k;rn rn list[0] = k;rn count = 0;rn rn comb(m, k);rn rn cout << count << endl;rn rn getchar();rn getchar();rn rn return 0;rnrnrnvoid comb(int m, int k)rnrn for ( int i = m; i >= k; i-- )rn rn list[k] = i;rn rn if ( k == 1 )rn rn count++;rn for ( int j = 1; j << list[j] << " ";rn rn cout << endl;rn rn elsern rn comb(i-1, k-1);rn rn rnrn[/code]rnrn错误信息为 15 E:\2007011303\6_4_4b.cpp `count' undeclared (first use this function) rncount 全局变量<em>为什么</em>声明了还出错呢?
为什么在VS2005编译出错呢?
看C++ Primer 第4版里有个rndouble dval=3.14;rnconst int &ri=dval;rn编译却说rnc:\documents and settings\***\my documents\visual studio 2005\projects\test\main.cpp(13) : warning C4244: 'initializing' : conversion from 'double' to 'const int', possible loss of data
方法为什么会执行两遍呢~
表单页面是a1.jsp提交修改,提交给m.jsp,这个JSP去调用一个类中的<em>方法</em>,然后根据此<em>方法</em>返回的值,如果“失败”请求转发给a1.jsp这个提交的页面,如果“成功”重定向到查询页面去。rn现在点击修改后,可以修改成功,但是后台打印却打印了两遍,比如说这个类的这个<em>方法</em>接收一个String a,在<em>方法</em>中打印。a和执行SQL,打印就是这样了:rn-----------------a:...rn-----------------a:...rn-------------SQL:updata......rn-------------SQL:updata......rn但有时就是这样的:rn-----------------a:...rn-------------SQL:updata......rn-----------------a:...rn-------------SQL:updata......rnrn应该是:rn-----------------a:...rn-------------SQL:updata......rnrn这个跟我请求转发回提交页有关吗?rn求助。
为什么方法中的值会见了呢?
procedure _GetexeName(strName,ASourFile,FileName: string);rnvar sour_path,sour_file: string;rnTmpList:TStringList;rnFileRec:TSearchrec;rni: Integer;rnbeginrn if rightStr(trim(ASourFile), 1) <> '\' thenrn sour_path :=trim(ASourFile) + '\'rn elsern sour_path :=trim(ASourFile);rn sour_file:= FileName;rnrn if not DirectoryExists(sour_path) then //判断有没有目录rn beginrn exit;rn end;rnrn TmpList:=TStringList.Create;rn TmpList.Clear;rnrn if FindFirst(sour_path+'*',faAnyfile,FileRec) = 0 thenrn beginrn repeatrn Application.ProcessMessages;rnrn if ((FileRec.Name = '.') or (FileRec.Name = '..')) then Continue; //判断文件是否为'.','..'。是就结束循环rn if DirectoryExists(sour_path + FileRec.Name) then //判断是否有目录rn beginrn continue;rn //_GetFileList1(AStrings, sour_path+ FileRec.Name + '\', sour_file);rn endrn elsern beginrn if (UpperCase(extractfileext(sour_Path + FileRec.Name)) = UpperCase(FileName)) or (FileName = '.*') thenrn TmpList.Add(FileRec.Name);rn end;rn until FindNext(FileRec)<>0;rnrn SysUtils.FindClose(FileRec);rn end;rnrn for i := 0 to TmpList.Count -1 dorn beginrn if Pos('jsj', TmpList.Strings[i]) > 0 thenrn strName:= TmpList.Strings[i];//<em>方法</em>里面,这里的strName等与'YTjsj.exe'。但是下面调用之后,strName还是空rn end;rn TmpList.Free;rnend;rnrn//下面是调用rn_GetexeName(strName,'这是路径', '.exe');rnstrName的值是'';//<em>为什么</em>啊?rnrn这是遍历文件夹下的。exe文件,然后名字中含有‘jsj’的就赋值给strName。但是调用这个<em>方法</em>后,strName是空的。可以我调试的时候strName明明有值的。rn这到底是<em>为什么</em>啊?求大牛解答。
为什么一个全新的工程会编译出错???
刚刚装完了Kylix3 for C++. 按照网上的说明,覆盖了四个头文件.rnrn是编译时还是有很多的错误:rn[Linker Error] Unresolved external 'setlocale' referenced from /usr/local/kylix3/lib/release/rtl.a|System.ornrn[Linker Error] Unresolved external 'write' referenced from /usr/local/kylix3/lib/release/rtl.a|System.ornrn[Linker Error] Unresolved external 'wordexp' referenced from /usr/local/kylix3/lib/release/rtl.a|Libc.orn......rn等等......(还有一大堆类似的错误).rnrn<em>为什么</em>? 怎么办? 各位帮帮忙!!!
VK_A~VK_Z和VK_0~VK_9为什么编译出错?
正常用AppWizard生成的sdi程序,在OnKeyDown中使用VK_A~VK_Z和VK_0~VK_9<em>为什么</em>会<em>编译出错</em>?我可是赵MSDN上作的呀?请各位高手告知正确的用法(可别说用键盘的扫描码!我可记不住)
为什么下面的cpp程序会编译出错
我希望调用fun时,其中的obj不被改变。部分程序如下:rnrna.h中声明如下:rnclass otherclassrnrn ...rn int fun(const myclass& obj);rn ...rn;rnrna.cpp中实现为:rnint otherclass::fun(const myclass& obj)rnrn ...rn int num = obj.GetValueA(); (此行<em>编译出错</em>)rn ...rnrnrnmyclass类中定义的成员函数GetValueA()为rnint myclass::GetValueA()rnrn return ret;rnrnmyclass类声明为rnclass myclassrnrnpublic:rn int GetValueA();rnrnprivate:rn int ret;rn;rnrnrn在Linux下编译:rng++ -c -Wall a.cpprn错误信息为:rnpassing `const myclass' as `this' argument of `int rnmyclass::GetValueA ()' discards qualifiersrnrn但将a.h,a.cpp中相应的const去掉,则编译通过。rn
为什么会出现这样的编译出错信息?
--------------------Configuration: 五谷杂粮 - Win32 Debug--------------------rnCompiling...rnLdxsClass.cpprnC:\Program Files\Microsoft Visual Studio\MyProjects\五谷杂粮\LdxsClass.cpp(189) : fatal error C1004: unexpected end of file foundrnMainFrm.cpprnGenerating Code...rnError executing cl.exe.rnrn五谷杂粮.exe - 1 error(s), 0 warning(s)rn
为什么会出错呢?
压缩数据库rnrn错误类型:rnMicrosoft JET Database Engine (0x80004005)rn尝试打开的数据库已经被机器 'MY-TOMATO' 上的用户 'admin' 以排它的方式打开。当数据库可使用后请再试一次。rnrnrn调用页面rnrn Dim dbpath,boolIs97rn dbpath = Request("dbpath")rn boolIs97 = Request("boolIs97")rn 'call CompactDB(dbpath,boolIs97)rn response.write(CompactDB(dbpath,boolIs97))rnrnrnrnrn'以下为函数rnFunction CompactDB(dbPath, boolIs97) '备份ACCESS数据库函数 dbPath=数据库路径(实际或虚拟路径) boolIs97=[bool]ACCESS数据库的版本(true=97 )rn Dim fso, Engine, strDBPathrn if mid(dbPath,2,1)<>":" then '查看数据库路径第二个字符是否为:如果是就是绝对路径了...否则为虚拟.rn dbPath=server.mappath(dbPath)rn end ifrnrn strDBPath = left(dbPath,instrrev(DBPath,"\"))rn Set fso = CreateObject("Scripting.FileSystemObject")rn If fso.FileExists(dbPath) Then'判断文件是否存在rn Set Engine = CreateObject("JRO.JetEngine")rn If boolIs97 = "True" Then'判断ACCESS数据库的版本 97rn Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath,"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb;" & "Jet OLEDB:Engine Type=4"rn Else'判断ACCESS数据库的版本 Access 2000、2002、2003rn Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath,"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb"rn End Ifrn fso.CopyFile strDBPath & "temp.mdb",dbpathrn fso.DeleteFile(strDBPath & "temp.mdb")rn Set fso = nothingrn Set Engine = nothingrn CompactDB = " "'返回正确执行信息rn Else '文件不存在rn CompactDB = " "'返回错误执行信息rn End IfrnEnd Function
为什么会这样呢???
...rnopen c_flight;rn fetch_loop:rn looprn fetch c_flight into rn v_TMP_RID,rn v_TMP_ALD,rn v_TMP_LBN,rn v_TMP_NME,rn v_TMP_ALC,rn v_TMP_FLN,rn v_TMP_SUF,rn v_TMP_DTE,rn v_TMP_DEP,rn v_TMP_DIF,rn v_TMP_05A,rn v_TMP_ARR,rn v_TMP_BPT,rn v_TMP_OPT,rn v_TMP_IDP,rn v_TMP_BDP,rn v_TMP_ANC,rn ...rn我跟踪数据发现,除了前5个变量有值外,其他后面的变量都是null.我在前面定义游标的时候,其中的select语句是正确的,可以查到表里面的数据啊.有碰到这种情况的朋友,请帮忙解答一下.
为什么会错呢????????????????????????????????????????????????????
在Interface单元中使用DsgnIntf,可编译时总说dsgnIntf.dcu找不到,可delphi6的帮助中可以找到.<em>为什么</em>,帮帮我.
为什么会这样呢
我帮人用ASP.NET/MSSQL做一个网站(www.hr-shanghai.com,还没有做完),在CSDN首页的广告上的时创网络租了一款支持ASP.NET/MSSQL的虚拟主机,<em>为什么</em>有时候点击站内链接,忽然变慢,最后跳到其他网站的网页上了(该站点也是位于同一台服务器上他们的客户网站),刷新一两次就恢复正常。怎么回事怎么回事?rn是他们的IIS设置有问题?还是域名解析有问题?还是我自身的C#程序有问题(里面用较多的SESSION,相不相关)?rn谢了rn
为什么会这样呢?
我做了一个很简单的数据库连接rn可是调试的时候就弹出这样的错误:用户定义类型未定义.rn代码如下:rnDim mdbpath As StringrnDim Conn As ADODB.ConnectionrnDim Rs As ADODB.RecordsetrnPrivate Sub Command1_Click()rnConn.Open "Provider=sqloledb;" & _rn "Data Source=" & servername & ";Initial Catalog=" & database % ";User Id=" & useid & ";Password=" & passwd & "; "rn rnEnd Sub
为什么会乱码呢...
请问一下是不是用脚本写的FORM提交的中文都为乱码?("测试"为"娴嬭瘯")rnrn我现在就这样,不知道有什么<em>方法</em>可以解决么?
为什么会拒绝访问呢?
java.security.AccessControlException: access denied (java.awt.AWTPermission createRobot)rn at java.security.AccessControlContext.checkPermission(Unknown Source)rn at java.security.AccessController.checkPermission(Unknown Source)rn at java.lang.SecurityManager.checkPermission(Unknown Source)rn at java.awt.Robot.checkRobotAllowed(Unknown Source)rn at java.awt.Robot.init(Unknown Source)rn at java.awt.Robot.(Unknown Source)rn at com.hyi.cake.applet.OrderReport.panelInit(OrderReport.java:415)rn at com.hyi.cake.applet.OrderReport.init(OrderReport.java:870)rn at sun.applet.AppletPanel.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnrnrn出错的代码段为:rnrn415处:rn//move mouse out of the applet and backrn try rn Robot rb = new Robot();//415rn rb.mouseMove(0, 0);rn rb.mouseMove(mouseX, mouseY);rn catch(AWTException e)rn e.printStackTrace();rn rnrnrn870处:rn public void init() rn goodsPanelInit();rn tableInit();rn scrollPanelInit();rn panelInit();//870rnrn rnrn大哥大姐帮我看看,这个是怎么回是啊?
*************************************为什么会coredump 呢?
erase 导致,谁解释下,怎样改?rnrn#include rn#include rnrnrnusing namespace std;rnrnint main()rnrn list listTest;rn listTest.push_back(1);rn list::iterator iter;rnrn for(iter =listTest.begin();iter!=listTest.end();iter++)rn rn if (*iter==1)rn rn listTest.erase(iter);rn continue;rn rn cout << "no iter is 1" << endl;rnrnrn rn return 0;rnrn
为什么会这样呢?
asp页面做好后上传,<em>为什么</em>有时候能打开,有时候打不开呢?rn打不开的时候提示:rn错误类型:rnProvider (0x80004005)rn/newaok/index.asp, 第 6 行rnrn第6行为:rnrs.open sql,connstr,3,4rnrnsql="select * from news"
为什么会编译报错呢?
下面的代码中rnB(& k)这个构造函数为甚么只能按引用方式来传递对象参数,而用按值的方式却编译报错??rnrn[code=C/C++][/code]rn#includernusing namespace std;rnclass Arnrn public:rn A()rn rn rn rn A(int aa)rn rn a=aa;rn rn private:rn int a;rn;rnrnclass Brnrn public:rn B()rn rn a=0;rn b=0;rn c=0;rn rn B(int aa,int bb) : a(aa),b(bb),c(aa-bb) rn rn rn rn rn rn B(B &k) rn rn a=k.a;rn b=k.b;rn c=k.a-k.b;rn rn rn rn rn void printf()rn rn cout<
为什么会错呢
import java.awt.event.*;rnimport javax.swing.JFrame;rnrnpublic class TestKey rn public static void main(String[]args)rn new TestKey().launchFrame();rn rn rn void launchFrame()rn addKeyListener(new Monitor());rn setBounds(300,300,300,500);rn setVisible(true);rn rn setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn rnrn class Monitor extends KeyAdapterrn public void keyPressed(KeyEvent e)rn int keycode=e.getKeyCode();rn if(keycode==KeyEvent.VK_0 )rn System.out.println("nihao");rn rn rn rn
为什么会重定义呢?
stdafx.h 包含了 rn#include "Global.h"rn#include "externs.h"rnrnGlobal.h :rn#pragma oncernrnLPWSTR pSysDir = NULL;rnLPWSTR pAppDir = NULL;rnrnrnexterns.h:rn#pragma oncernrnextern LPWSTR pSysDir;rnextern LPWSTR pAppDir;rnrn连接的时候就出现了:rninject.obj : error LNK2005: "unsigned short * pSysDir" (?pSysDir@@3PAGA) 已经在 stdafx.obj 中定义rninject.obj : error LNK2005: "unsigned short * pAppDir" (?pAppDir@@3PAGA) 已经在 stdafx.obj 中定义rn
为什么会出错呢?
我测试以下代码,但就是无法编译。请各位帮帮我,谢谢。rnrnentry startrnstart:rnmov ax,#0xb800rnmov es,axrnseg esrnmov [0],#0x41rnseg esrnmov [1],#0x1frnloop1: jmp loop1rnrn我使用的是 MASM32。rn我急需解决这个问题,请用邮件happybabyq@msn.com 或 QQ:83107165 回复我,谢谢!
为什么会这样的呢?
cnn.open "provider=Microsoft.jet.oledb.4.0;uid=admin;pwd=11;_rndata source=" &server.mappath("ggjt.mdb")rnrnrncnn.open "driver=microsoft access driver *.mdb);uid=admin;pwd=11;_rndbq="&server.mappath("ggjt.mdb")
为什么会报错呢!!!!!!
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这是为啥 望各位大虾指教
为什么会没反应了呢
看看下面的代码rn#include "iostream"rn rnvoid main()rn rn rn int a; rn int i; rn a=~0; rn i=1;rn while((a>>=1)!=0) rn ++i; rn printf("num of bits:%d\n",i);rnrnrn
为什么会不相等呢?
请看下面的一段小代码:rn....rnthisStr="dghsj,djsdlk,dioed,feifj,djsk"rnthisArray=split(thisStr,",")rn...rnRs.open "select * from mytable where BookName=thisArray(0)",Conn,1,1rn...rnRs.movefirstrnresponse.write "thisArray(0)=" & thisArray(0) &" Rs('BookNmae')="&Rs("BookNmae") &" "rnif thisArray(0)=Rs("BookName") thenrn response.write "相等"rnelsern response.write "不相等"rnend ifrn.....rn--------------------rn<em>为什么</em>输出总是“不相等”呢?rn而且上面的第一个语句输出的明明是 thisArray(0)=12 Rs('BookNmae')=12rn什么原因呢?rn
为什么会相等呢
string msg1 = "abc";rn string msg2 = "abc";rn if (object.ReferenceEquals(msg1, msg2))rn rn string he = "yes";rn
为什么会出现异常呢?
package gcwd;rnrnimport java.sql.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport gcwd.DBConnection;rnimport java.io.*;rnrnpublic class yj_Tree_Bean rnDBConnection conn=new DBConnection();rnString query = "";rnString parentid = "52500000000";rnpublic yj_Tree_Bean()rnrnrnrnrnpublic void init(javax.servlet.jsp.JspWriter out,javax.servlet.http.HttpServletRequest request)rnrnbuildTree(out,parentid,0);rnrnrnpublic void buildTree(javax.servlet.jsp.JspWriter out,String theHtbh,int level)rnrnlevel = level +1;rntryrnrnquery = "select htbh from xt_wdzl where fdbh='" + theHtbh + "'";rnSystem.out.println(query);rnResultSet resultset = conn.executeQuery(query);rnresultset.first();rnwhile(!resultset.isAfterLast())rnrnout.println(resultset.getString("htbh"));rnresultset.next();rnrnrncatch(Exception ex)rnrnSystem.out.println(ex);rnrnrnrnrnrn在JSP页面中直接调用rntreeBean.buildTree(out,"52500000000",0);rnrn出现java.lang.NullPointerException异常,<em>为什么</em>?
为什么会退出呢?
我通过一个对话框界面dlg1,调用另一个对话框界面dlg2,在dlg2中有个ok按钮,ok按钮的代码如下rn void dlg2::OnOK() rn rn int intReturn = AfxMessageBox("退出?",MB_YESNOCANCEL);rn if (intReturn == IDYES)rn MessageBox("modal save"); rn rn elsern return;rn rnrn CDialog::OnOK();rnrn点击ok按钮,如果确认,dlg2消失,当前界面回复到dlg1。rnrn但是我现在在dlg2.h中加入了一个工具栏变量后rnpublic:rn CToolBar m_ToolBar1;rn再次运行该程序时,结果是 点击ok按钮,如果确认,dlg2消失,当前程序结束运行。rnrn请问:这是<em>为什么</em>?rnrn
为什么会这样呢!??
我学delphi已经一年了,从大二就开始学,一直到现在工作还在学, 我总是认为自已还能用delphi做出什么东东来但是一看下别人做的系统,一看就会,他们写的代码, 我都会, 可就rn感到不能做什么好东东所以就每天看书看代码到头呢,还是一样没有进步, 不知到各位有没有这样感受.
为什么会出错呢???
[code=VB.NET]Public Function ExcSQLresult(ByVal sql As String) As Integerrn Dim cnn As New SqlConnection(strconn)rn Dim result As Integerrn Tryrn cnn.Open()rn cmd.Connection = cnnrn cmd.CommandText = sqlrn cmd.CommandType = CommandType.Textrn result = cmd.ExecuteScalarrnrn If result <= 0 Thenrn result = 0rn End Ifrn Catch ex As Exceptionrn Finallyrn cnn.Close()rn End Tryrn Return resultrn End Function[/code]
【【【【【【【【为什么会这样呢?】】】】】】】】
Set msg = Server.CreateObject("JMail.Message") rn msg.silent = true rn msg.Logging = true rn msg.Charset = "gb2312" rn msg.ContentType = "text/html" rn msg.MailServerUserName = "abc@abc.cn" '输入smtp服务器验证登陆名 (邮局中任何一个用户的Email地址) rn msg.MailServerPassword = "abc" '输入smtp服务器验证密码 (用户Email帐号对应的密码) rn msg.From = yourmail '发件人Email rn msg.FromName = yourname '发件人姓名 rn msg.AddRecipient sendmail '收件人Email rn msg.Subject = "subject" '信件主题 rn msg.htmlBody = httphref&"   "&rs("news_content") '正文 rn msg.Send ("anjan.cn") 'smtp服务器地址(企业邮局地址) rn msg.closern set msg = nothing rnrn在收邮件的时候,还是看到nbsp 这样的代码。<em>为什么</em>呢?
为什么会卡死呢
public Form1()rn rn this.Paint += new PaintEventHandler(f1_Paint);rn rn rn private void f1_Paint(object sender, PaintEventArgs e)rn rn Graphics g = e.Graphics;rn Random r = new Random();rn int m;rn rn while (true)rn rn m = r.Next(4);rn switch (m.ToString("")) rn rn case "3": g.DrawLine(new Pen(Color.CornflowerBlue, 8), 30, 200, 35, 200); break;rn case "2": g.DrawLine(new Pen(Color.CornflowerBlue, 8), 60, 200, 65, 200); break;rn case "1": g.DrawLine(new Pen(Color.CornflowerBlue, 8), 90, 200, 95, 200); break;rn case "0": g.DrawLine(new Pen(Color.CornflowerBlue, 8), 120, 200, 125, 200); break;rn default: g.DrawLine(new Pen(Color.CornflowerBlue, 8), 120, 200, 125, 200); break;rn // default: break;rn rn System.Threading.Thread.Sleep(1000);rn rnrnrn<em>为什么</em>运行起来会卡死................不是sleep了吗rnrnrn
为什么会这样呢?????????????
我做了一个MDI程序,弹出时有一logon对话框提示输密码。rn现在我加了一个splash闪屏,用的是VC中提供的标准splash,rn但是它是自动在CMainFrame::OnCreate函数中加入显示splash代码,在程序主框架出来后才显示,我就将这段代码移到CdemoAPP::InitInstance函数里,这样在程序主框架出来前就可以显示splash,但是每次到调用logon对话框登录时就会出错,怎么回事呢?我的调用logon对话框那段代码是在CMainFrame::OnCreate中的。rnrn还有我现在出现logon登录框是在程序主框架出来前就要求登录,我想在程序主框架出来后才出现logon登录框,以便让用户能看见程序主框架,那我该把这段代码放在什么地方呢?rnrn我想这个问题应该不难,只不过我太笨而已,请各位高手指点。
为什么会这样呢?.....................
我从我的电脑拷贝一个5G的文件到另外一台电脑上,它却显示"磁盘空间已满,无法进行拷贝".可是另一台电脑上明明还有30G的空间呀,怎么会这样呢?
为什么会不一样呢?
TIJ(中文版)的第654页(英文908)上说:rn 本机回路的IP地址,可以通过<em>方法</em>getByName()和getLocalHost()取得。rn 但是,这两种<em>方法</em>取得的地址怎么不一样呢?rn 用InetAddress.getByName(null)得到的是127.0.0.1rn 而用InetAddress.getLocalHost()得到的是192.168.32.11(我的IP).rnrn请赐教!谢谢!
为什么会截然不同呢?
下面程序的结果是120。但是如果把第10行的abs(1)改成1的话,则程序结果是1。<em>为什么</em>会有这样不同的结果。rnint fact()rnrn static int i = 5;rn if (i == 0)rn rnreturn (1);rn rn else rn rn i = i –1;rn return ((i+abs(1))*fact()); /*第10行*/rn rn rn main()rn rn printf(“factor of 5 = %d\n”,fact());rn rn
编译出错了,为什么???
<em>为什么</em>会<em>编译出错</em>,在线等...........rnrn#includern#includern#includern#includern#includern#define STACK_INCREAMENT 10;rn#define STACK_INTSIZE 100;rntypedef int selemtype;rntypedef struct Snodernrn selemtype *base;rn selemtype *top;rn int stacksize;rnSnode;rnrnvoid Init_stack(Snode &s)rnrn s.base = (selemtype *)malloc(STACK_INTSIZE * sizeof(selemtype));rn if( !s.base )rn rn printf(" the overflow error in Init_stack\n ");rn exit(1);rn rn s.stacksize = STACK_INTSIZE;rn s.top = s.base;rnrnvoid main()rnrn
为什么编译出错
MessageBox("The Sample.DLL has already been load.");rnrn这句老是通不过编译为何?:
MFC入门真难,为什么编译出错呢?
//hello.hrn#pragma once rnrnclass CMyApp : public CWinApprnrnpublic:rnvirtual BOOL InitInstance();rn;rnrnclass CMainWindows : public CFrameWndrnrnpublic:rnCMainWindows();rnprotected:rnafx_msg void OnPaint();rnDECLARE_MESSAGE_MAP();rn;rnrn//hello.cpprn#include rn#include "Hello.h"rnrnCMyApp theApp;rnrnBOOL CMyApp::InitInstance()rnrnm_pMainWnd = new CMainWindows;rnm_pMainWnd->ShowWindow(m_nCmdShow);rnm_pMainWnd->UpdateData();rnreturn TRUE;rnrnrnBEGIN_MESSAGE_MAP(CMainWindows, CFrameWnd)rnON_WM_PAINT()rnEND_MESSAGE_MAP()rnrnCMainWindows::CMainWindows()rnrnCreate(NULL,_T("The Hello Application"));rnrnvoid CMainWindows::OnPaint ()rnrnCPaintDC dc (this);rnrnCRect rect;rnGetClientRect (&rect);rnrndc.DrawText (_T ("Hello, MFC"), -1, &rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);rnrnrn编译错误:rn--------------------Configuration: hello - Win32 Debug--------------------rnLinking...rnmsvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _mainrnDebug/hello.exe : fatal error LNK1120: 1 unresolved externalsrnError executing link.exe.rnrnhello.exe - 2 error(s), 0 warning(s)
为什么会找不到方法
import javax.swing.*;rn......rn JOptionPane.showConfirmDialog(....)rn......rn编译的时候提示:错误的<em>方法</em>:showConfirmDialog(....)
在类方法中调用实例化方法为什么编译出错
rn写一个树链接函数rnCTreernrnpublic :rnvoid * m_pParent;rnvoid * m_pChild;rn...rnrnrnCTree::CTree()rnrnm_pParent = NULL;rnm_pChild = NULL;rn...rnrnrnvoid CTree::Add(void* p)rnrn...rn//<em>编译出错</em>???rnCTree lp = new CTree();rn rnrn
为什么会进入死循环呢?
#pragma warning ( disable: 4786 )rn#includern#includern#includern#includernrnusing namespace std;rnrnmap probabilityMap;rnrn//void InputProbability()rnint main()rnrn ofstream outputProbability;rn string outputProbabilityFile("copyOutputProbability.txt");rnrnrn ifstream inputProbability;rn string inputProbabilityFile("outProbabilityFile.txt");rnrn inputProbability.open ( inputProbabilityFile.c_str ());rnrn if ( !inputProbability )rn rn cerr<<> word )rn //probabilityMap[word]++;rn double num;rn if ( inputProbability >> num )rn rn probabilityMap[word] = num ;rn rn rn rn // while ( )rn inputProbability.close();rn rnrnrn outputProbability.open(outputProbabilityFile.c_str ());rn if ( !outputProbability )rn rn cerr<<< (*it).first << " " << endl;//(*it).second<
为什么会显示两遍呢?
初学者,不要笑呀。rnrnarticle.xmlrn------------begin--------------rn rnrnrn rn 2rn test2rn zsq2rn test2rn 1rn 2003-1-9rnrn rn 1rn testrn zsqrn testrn 1rn 2003-1-8rnrnrn-------------end--------------rnrnarticle.xslrn-------------begin-------------rnrnrnrnrn rnrnrnrn rn rn rn rn rn rn rn rn rn rnrnrnrn------------------end--------------rnrn<em>为什么</em>显示成:rnrn2 test2 zsq2 2003-1-9 rn1 test zsq 2003-1-8 rn2 test2 zsq2 2003-1-9 rn1 test zsq 2003-1-8 rnrn这样呢?rn
为什么会释放掉呢??
library HardWare;rnrnusesrn SysUtils,rn Classes,rn HardDisk in 'HardDisk.pas',rn UnRegister in 'UnRegister.pas';rnrn exportsrn GetDiskSerialNumber,rn EncryptIdeSerial,rn RegsisterIdeSerial,rn IdeSerialIsRegsister;rn$R *.resrnbegin//在这里释放时出错了!rnend.rnrnunit HardDisk;rnrninterfacernrnusesrn Windows, Controls, SysUtils;rntypern TSrbIoControl = packed recordrn HeaderLength: ULONG;rn Signature: array[0..7] of Char;rn Timeout: ULONG;rn ControlCode: ULONG;rn ReturnCode: ULONG;rn Length: ULONG;rn end;rn SRB_IO_CONTROL = TSrbIoControl;rn PSrbIoControl = ^TSrbIoControl;rnrn TIDERegs = packed recordrn bFeaturesReg: Byte; // Used for specifying SMART "commands".rn bSectorCountReg: Byte; // IDE sector count registerrn bSectorNumberReg: Byte; // IDE sector number registerrn bCylLowReg: Byte; // IDE low order cylinder valuern bCylHighReg: Byte; // IDE high order cylinder valuern bDriveHeadReg: Byte; // IDE drive/head registerrn bCommandReg: Byte; // Actual IDE command.rn bReserved: Byte; // reserved. Must be zero.rn end;rn IDEREGS = TIDERegs;rn PIDERegs = ^TIDERegs;rnrn TSendCmdInParams = packed recordrn cBufferSize: DWORD;rn irDriveRegs: TIDERegs;rn bDriveNumber: Byte;rn bReserved: array[0..2] of Byte;rn dwReserved: array[0..3] of DWORD;rn bBuffer: array[0..0] of Byte;rn end;rn SENDCMDINPARAMS = TSendCmdInParams;rn PSendCmdInParams = ^TSendCmdInParams;rnrn TIdSector = packed recordrn wGenConfig: Word;rn wNumCyls: Word;rn wReserved: Word;rn wNumHeads: Word;rn wBytesPerTrack: Word;rn wBytesPerSector: Word;rn wSectorsPerTrack: Word;rn wVendorUnique: array[0..2] of Word;rn sSerialNumber: array[0..19] of Char;rn wBufferType: Word;rn wBufferSize: Word;rn wECCSize: Word;rn sFirmwareRev: array[0..7] of Char;rn sModelNumber: array[0..39] of Char;rn wMoreVendorUnique: Word;rn wDoubleWordIO: Word;rn wCapabilities: Word;rn wReserved1: Word;rn wPIOTiming: Word;rn wDMATiming: Word;rn wBS: Word;rn wNumCurrentCyls: Word;rn wNumCurrentHeads: Word;rn wNumCurrentSectorsPerTrack: Word;rn ulCurrentSectorCapacity: ULONG;rn wMultSectorStuff: Word;rn ulTotalAddressableSectors: ULONG;rn wSingleWordDMA: Word;rn wMultiWordDMA: Word;rn bReserved: array[0..127] of Byte;rn end;rn PIdSector = ^TIdSector;rnrnconstrn IDE_ID_FUNCTION = $EC;rn IDENTIFY_BUFFER_SIZE = 512;rn DFP_RECEIVE_DRIVE_DATA = $0007C088;rn IOCTL_SCSI_MINIPORT = $0004D008;rn IOCTL_SCSI_MINIPORT_IDENTIFY = $001B0501;rn DataSize = sizeof(TSendCmdInParams) - 1 + IDENTIFY_BUFFER_SIZE;rn BufferSize = SizeOf(SRB_IO_CONTROL) + DataSize;rn W9xBufferSize = IDENTIFY_BUFFER_SIZE + 16;rnrnrnfunction GetIdeDiskSerialNumber: string;rnrnimplementationrnrnrnrnrnfunction GetIdeDiskSerialNumber: string;rn procedure ChangeByteOrder(var Data; Size: Integer);rn var ptr: PChar;rn i: Integer;rn c: Char;rn beginrn ptr := @Data;rn for i := 0 to (Size shr 1) - 1 dorn beginrn c := ptr^;rn ptr^ := (ptr + 1)^;rn (ptr + 1)^ := c;rn Inc(ptr, 2);rn end;rn end;rnvarrn hDevice: THandle;rn cbBytesReturned: DWORD;rn pInData: PSendCmdInParams;rn pOutData: Pointer; // PSendCmdOutParamsrn Buffer: array[0..BufferSize - 1] of Byte;rn srbControl: TSrbIoControl absolute Buffer;rnbeginrn Result := '';rn FillChar(Buffer, BufferSize, #0);rn if Win32Platform = VER_PLATFORM_WIN32_NT thenrn begin // Windows NT, Windows 2000rn// Get SCSI port handlern hDevice := CreateFile('\\.\Scsi0:',rn GENERIC_READ or GENERIC_WRITE,rn FILE_SHARE_READ or FILE_SHARE_WRITE,rn nil, OPEN_EXISTING, 0, 0);rn if hDevice = INVALID_HANDLE_VALUE then Exit;rn tryrn srbControl.HeaderLength := SizeOf(SRB_IO_CONTROL);rn System.Move('SCSIDISK', srbControl.Signature, 8);rn srbControl.Timeout := 2;rn srbControl.Length := DataSize;rn srbControl.ControlCode := IOCTL_SCSI_MINIPORT_IDENTIFY;rn pInData := PSendCmdInParams(PChar(@Buffer)rn + SizeOf(SRB_IO_CONTROL));rn pOutData := pInData;rn with pInData^ dorn beginrn cBufferSize := IDENTIFY_BUFFER_SIZE;rn bDriveNumber := 0;rn with irDriveRegs dorn beginrn bFeaturesReg := 0;rn bSectorCountReg := 1;rn bSectorNumberReg := 1;rn bCylLowReg := 0;rn bCylHighReg := 0;rn bDriveHeadReg := $A0;rn bCommandReg := IDE_ID_FUNCTION;rn end;rn end;rn if not DeviceIoControl(hDevice, IOCTL_SCSI_MINIPORT,rn @Buffer, BufferSize, @Buffer, BufferSize,rn cbBytesReturned, nil) then Exit;rn finallyrn CloseHandle(hDevice);rn end;rn endrn elsern begin // Windows 95 OSR2, Windows 98rn hDevice := CreateFile('\\.\SMARTVSD', 0, 0, nil,rn CREATE_NEW, 0, 0);rn if hDevice = INVALID_HANDLE_VALUE then Exit;rn tryrn pInData := PSendCmdInParams(@Buffer);rn pOutData := @pInData^.bBuffer;rn with pInData^ dorn beginrn cBufferSize := IDENTIFY_BUFFER_SIZE;rn bDriveNumber := 0;rn with irDriveRegs dorn beginrn bFeaturesReg := 0;rn bSectorCountReg := 1;rn bSectorNumberReg := 1;rn bCylLowReg := 0;rn bCylHighReg := 0;rn bDriveHeadReg := $A0;rn bCommandReg := IDE_ID_FUNCTION;rn end;rn end;rn if not DeviceIoControl(hDevice, DFP_RECEIVE_DRIVE_DATA,rn pInData, SizeOf(TSendCmdInParams) - 1, pOutData,rn W9xBufferSize, cbBytesReturned, nil) then Exit;rn finallyrn CloseHandle(hDevice);rn end;rn end;rn with PIdSector(PChar(pOutData) + 16)^ dorn beginrn ChangeByteOrder(sSerialNumber, SizeOf(sSerialNumber));rn SetString(Result, sSerialNumber, SizeOf(sSerialNumber));rn end;rnend;rnrnend.rnrnrnUnRegister.Pas里调用的rnfunction GetDiskSerialNumber: PChar; stdcall;rnbeginrn Result := pchar(Trim(GetIdeDiskSerialNumber));rnend;rn上面是我Dll里的代码!rn我用动态加载的<em>方法</em>,但在释放时出错了!rn下面是我动态加载的<em>方法</em>!rn function GetDiskSerialNumber: PChar;rn type THardDisk = function: PChar; stdcall;rn var HardDisk: THardDisk;rn Hm: HMODULE;rn beginrn tryrn Hm := LoadLibrary('HardWare.dll');rn if DWord(Hm) > 0 thenrn beginrn HardDisk := GetProcAddress(Hm, 'GetDiskSerialNumber');rn Result := HardDisk;rn end;rn finallyrn FreeLibrary(Hm);rn end;rn end;
为什么会输出0呢
#include rnusing namespace std;rnint main( )rnrn double a,b,c,s;rn a = 3; rn b = 4;rn c = 5;rn s = 1/2 * (a+b+c);rn cout<<
啊啊啊,为什么会这样呢?
想做一个万年历,但是用date函数生成的月份比如二月份,是显示02的,怎么让他变成2呢?
四舍五入为什么会这样呢?
我在vb里面调用round()时,对于single型的数据的不到我所要的结果:比如round(1.255,2) 我想得到1.26,可是得到的却是1.25rn还有round(1.205,2),我想得到1.20,可是得到的却是1.2,请问这是<em>为什么</em>,难道用什么别的函数可以实现?能给我一个答案吗?谢谢!rn
为什么会成为死循环呢?
#includern#includernusing namespace std;rnclass Timernrnpublic:rn int ChkCin(int num);rnrn//判断数据是否为整型rnint Time::ChkCin(int num)rnrn if(cin.fail())rn rn cin.clear();rn return 0;rn rn return 1; rnrnint main()rnrn Time t;rn int x=0;rn cin>>x;rn while(t.ChkCin(x)==0[color=#993300])//这里判断是否为整型,不是,就要求重输入.[/color] rn rn cout<>x; rn rnrn可是我发现,我输入字母后,它会变成死循环,一直在写"数据有误",停不下来了.<em>为什么</em>啊?!!好心人,帮帮忙吧!
这个为什么会报错呢?
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
为什么会Insert出错呢?
OleDbConnection conn=new OleDbConnection(StrConnect);rn rn OleDbCommand myCommand=new OleDbCommand("Insert Into Table1 (number) Values (@num)",conn);rn OleDbParameter numParameter=new OleDbParameter("@num",OleDbType.VarChar,50);rn numParameter.Value=Session["No"].ToString();rn myCommand.Parameters.Add(numParameter);rn conn.Open();rn myCommand.ExecuteNonQuery();rn conn.Close();rnrn调试时却提示INSERT语句语法错误!!rn到底哪有问题????
为什么会提示溢出呢?
Dim Asc() As IntegerrnDim db As DatabasernrnDim Rec As IntegerrnPrivate Rs As New ADODB.RecordsetrnPrivate Conn As New ADODB.ConnectionrnrnrnPrivate Sub Form_Load()rnrn Dim strConn As Stringrn Dim i As Integerrn rn ' 连接数据库的字符串rn ' 连接带密码的数据库,直接在连接符后面加上Jet OLEDB:DataBase Password='您的密码'rn ' 连接Access97数据库需要使用Jet.OLEDB.3.5,Access2K和以上数据库使用Jet.OLEDB.4.0rn strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\data\fw_data.mdb;Persist Security Info=False"rn rn ' 使用客户端数据游标rn Conn.CursorLocation = adUseClientrn ' 打开Access的连接rn Conn.Open strConnrn rn ' 如果RecordSet的状态不是关闭状态,则关闭Recordsetrn If Rs.State <> adStateClosed Then Rs.Closern rn ' Recordser打开表rn Rs.Open "Select * from fw_users", Conn, adOpenKeyset, adLockOptimisticrn rn rnRs.MoveLastrnRec = Rs.RecordCountrnReDim Asc(Rec - 1)rnRs.MoveFirstrnFor i = 1 To Recrn cmb_name.AddItem Rs.Fields("fw_name")rn' Asc(i - 1) = Val(Rs.Fields("fw_pwd")) <em>为什么</em>会溢出呢?rn Rs.MoveNextrn If Rs.EOF Then Exit ForrnNextrn'cmb_name.Text = ""rntxt_pass.Text = ""rnrnEnd Subrnrn数据库:fw_data.mdbrn表为:fw_usersrn有字段:FW_NAME和FW_PWD,且皆为文本类型,长度15rn有两条数据rnrnrn<em>为什么</em>一运行就提示溢出呢?rnrn调试返回到这条:rnAsc(i - 1) = Val(Rs.Fields("fw_pwd")) rnrnrnrn请问是什么原因啊? 怎么解决呢?rn
为什么会如此烦躁呢?
遇到一个很烦躁的地方rn以前学习c语言最害怕的地方就是关于文件处理的地方rnrn本以为学习c++之后只会合cin cout getline打交道了rn没想到还是在c++中遇到c语言中的一些让偶头疼得要死的地方rnrn且看下面一个小程序(源自c++编程思想卷1中文版)rnrnincline void require(bool requirement,const std::string &msg="Requirement failed")rnrn using namespace std;rn if(!requirement)rn rn fputs(msg.c_str(),stderr);//此句究竟是什么意思啊 ?????rn fput("\n",stderr);rn rn exit(1);rnrnrn这个程序看了半个小时很郁闷rn1 fputs不就是向文件里面写字符串的命令么???是这样么?rn然后既然是写字符串,为何还要msg.cstr(),这不成了名字么?????rnrn2 stderr怎么理解它呢?我知道stderr是系统默认的错误输出,是这样么???rnrn3 fputs(msg.c_str(),stderr);这一句看起来很难过rnrn 能不能够写成rn ostream out(msg.c_str);rn out<
为什么会出现乱码呢?
我这个程序编译能通过,但是输出结果商品名称时出现乱码,请问是怎么一回事?请高手指点迷津!谢谢了!rn#includern#includernclass publicationrnrn protected:rn char *title;rn float price;rn public:rn virtual void getData(char *name,float rate);rn virtual void putData();rn;rnvoid publication::getData(char *name,float rate)rn rn rn title=name;rn price=rate;rnrnvoid publication::putData()rn rn cout<>pages; rn pageCount=pages; rn rn void putData()rn rn publication::putData();rn cout<<>times;rn tapeTime=times;rn rn void putData()rn rn publication::putData();rn cout<<>choice;rn switch(choice)rn rn case 'B':rn case 'b':rn ptr=new book;rn break;rn case 'T':rn case 't':rn ptr=new tape; rn rn rn cout<>n;rn cout<>p; rn ptr->getData(&n,p);rn ptr->putData();rn system("pause");rn rn
为什么会过界呢?
varrn tbilist:tstringlist;rn vtables:variant;rnbeginrntbilist:=tstringlist.create;rnadoconnection.gettablenames(tbilist);rnvtables:=vararraycreate([0,tbilist-1],varvariant);rn<em>为什么</em>运行到这里就抱错说:variant array index out of bounds呢?rn谢谢,帮帮我吧!
为什么Include会失效呢?
我写了这样的代码rnrn在某些ASP.NET项目中,可以运行通过,文件被正确包含。但是在某些项目中却没有生效。rn大家知道这是<em>为什么</em>吗?
为什么这个会抛出异常呢
我是按照写Frame的方式写JFramern不能这么写么 让他消除窗口装饰rnrnrnimport javax.swing.JFrame;rnrnrnpublic class camera rnrn JFrame j=new JFrame();rn rn public camera()rn rn init();rn rn public void init()rn rn j=new JFrame();rn j.setVisible(true);rn j.setUndecorated(true); //去掉窗口装饰 rn j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); rn j.setVisible(true); rn j.setExtendedState(JFrame.MAXIMIZED_BOTH);rn rn rn public static void main(String args[])rn rn new camera();rn rnrn
为什么会提示出错呢?
代码:rnconnCount.Execute ("delete * from count where postdate < #" & aaa & "#")rnrn这个代码是显示在线人数的一部分,放在服务器上没问题,但是在XP下测试却提示错误“HTTP 500 内部服务器错误”。这是怎么回事啊?
为什么样式会丢失呢?
当我从服务器走一趟 比如将某个 文本控件置空,那么回来以后样式就丢失了。很难看rn还有 我的VS2005 怎么经常切换不到 设计试图 昨天也发生了今天也发生了rn请问 该如何是好? 谢谢!
为什么记录会少呢?
当我把每页的记录数(rs.pagesize)改的越大,页面的记录就无法检测到,数据库中明明有这些记录,可分页程序就是无法检测到。反面rs.pagesize的值越小,倒是能看到更多一些记录。请高手指教?rn程序:rnrnrnrnrn中间内容:rn rnrn分页:rn
一下为什么会出错呢?
badroom set关键字在传值得时候因为是英文总是提示包含update delete 关键字错误而没法打开所须要得连接传直失败,当该为badroom seat就没问题什么原因
为什么会打印自己呢?
char*s="char*s=%c%s%c;main()printf();";rn main()printf(s,34,s,34); rn看了上面的代码一直不明白,所以请大家帮忙啊
为什么会找不到radiobuttonlist呢
点击一个button产生了10个题,然后答案是ABCD 可是点击提交的button之后<em>为什么</em>找不到radiobuttonlist呢???rnprotected void Button1_Click(object sender, EventArgs e)rn rn for (int i = 0; i < 10; i++)rn rn RadioButtonList rbl = new RadioButtonList();rn rbl.ID = i.ToString();rn rbl.RepeatDirection = RepeatDirection.Horizontal;rn for (int j = 0; j < 4; j++)rn rn ListItem li = new ListItem();rn switch (j)rn rn case 0:rn li.Text = "A";rn li.Value = "A";rn break;rn case 1:rn li.Text = "B";rn li.Value = "B";rn break;rn case 2:rn li.Text = "C";rn li.Value = "C";rn break;rn case 3:rn li.Text = "D";rn li.Value = "D";rn break;rn rn rbl.Items.Add(li);rn rn Panel1.Controls.Add(rbl);rn rn rnrnprotected void Button2_Click(object sender, EventArgs e)rn rn for (int i = 0; i < 10; i++)rn rn RadioButtonList list = (RadioButtonList)Panel1.FindControl(i.ToString());rn if (list == null)rn Response.Write("为空");rn elsern Response.Write("不为空");rn rn rn每次输出来的都是“为空为空为空”rnrn这是<em>为什么</em> <em>为什么</em>
为什么会出现死循环呢?
dorn rn ...rn while(inquiry!='N'||inquiry!='n'); //输入N(n)的话结束程序rn ...rnrn 我如果输入sa的话,也就是两个或多个字母,就变成死循环了?WHY?谢谢
编译器为什么会报错呢?
#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>会报错呀
为什么会出错呢? CArrayPtr
CEikonEnv* eikonEnv = CEikonEnv::Static();rn TFileName mbmFile = eikonEnv->EikAppUi()->Application()->BitmapStoreName();rn CArrayPtr* icons = new(ELeave) CAknIconArray(4);rn CleanupStack::PushL(icons);rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial2, EMbmAllgridsQdialm2));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial3, EMbmAllgridsQdialm3));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial11, EMbmAllgridsQdialm11));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial21, EMbmAllgridsQdialm21));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial31, EMbmAllgridsQdialm31));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial41, EMbmAllgridsQdialm41));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial51, EMbmAllgridsQdialm51));rn icons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial61, EMbmAllgridsQdialm61));rn CleanupStack::Pop(icons);rn iGrid->ItemDrawer()->FormattedCellData()->SetIconArray(icons);rnrn注释上面任意一个rnicons->AppendL(eikonEnv->CreateIconL(mbmFile, EMbmAllgridsQdial51, EMbmAllgridsQdialm51));rnrn都是出错<em>为什么</em>rn改动CAknIconArray(4); 也是出错????????????????????
“窗体”为什么会变形呢??
Window单位窗体在preview时,已经调得很好了,但<em>为什么</em>一运行的时候,窗体就“变形”了呢?(或者很长,或者很宽),应该怎样解决呢? 请高手指点~~~~
这里为什么会出现异常呢?
#include rnusing namespace std;rnint main()rnrn cout<<
求助:为什么会这样呢?
用vs2005编译程序怎么会出现:rn1>c:\documents and settings\administrator\my documents\visual studio 2005\projects\我的24点\我的24点\我的24点.cpp(57) : warning C4996: “scanf”被声明为否决的rn1> c:\program files\microsoft visual studio 8\vc\include\stdio.h(295) : 参见“scanf”的声明
为什么这个会出错呢
rn rnrnrnrn哪里错了
服务端为什么会这样呢 ?
运行以下程序后服务断自动结束了,我想recvfrom()应该是等待客户锻发来消息再进行响应了,而我的客户端程序没运行,也就是没收到消息服务端就自动结束了,rn代码如下:(基于UDP的通信)rnrn#include rn#include rnvoid main()rnrn WORD ver;rn WSADATA wsadata;rn int flag;rn ver = MAKEWORD(1,1);rn rn flag=WSAStartup(ver,&wsadata);rn rn if(flag !=0)rn return ;rn rn if(LOBYTE(wsadata.wVersion) != 1 || HIBYTE(wsadata.wVersion) !=1)rn rn WSACleanup();rn return ;rn rnrn SOCKET sockSrv=socket(AF_INET,SOCK_DGRAM,0);rn SOCKADDR_IN addr;rn addr.sin_addr.S_un.S_addr=htonl(INADDR_ANY);rn addr.sin_family=AF_INET;rn addr.sin_port=htons(6000);rn rn bind(sockSrv,(SOCKADDR *)&addr,sizeof(SOCKADDR));rnrn char srvBuf[100]=0;rn SOCKADDR_IN addr2;rn int len=sizeof(SOCKADDR);rn recvfrom(sockSrv,srvBuf,100,0,(SOCKADDR *)&addr2,&len);//程序运行到这里应该会类似监听啊rn printf("收到的是 :%s",srvBuf);rnrn closesocket(sockSrv);rn WSACleanup();rnrn
为什么长度会变呢??
如下定义了一个结构体:rntypedef struct MSrnrn char charc;rn int inta;rn float floatd;rn;rnint main(int argc, char* argv[])rnrn printf("%d",sizeof(MS));rn return 0;rnrn按理说MS的长度应该是1(char)+4(int)+4(float)=9个字节;但是<em>为什么</em>显示是12个字节呢?
为什么object.Tostring()会出错呢?
TasklistView.Items[i].SubItems.Add( process["ExecutablePath"].ToString());rn就是这句,其中process["ExecutablePath"]函数返值是object,所以将其转换为string,但是出错:未将对象引用设置到对象的实例rnrn其它类似的都好使,只有这个process["ExecutablePath"]不行,它取到的值应该是类似“"C:\WINDOWS\EXPLORER.EXE"”的objectrn谁告诉我<em>为什么</em>阿,这问题折磨我两天了!
VBA实现文件操作、超链接、新建sheet下载
该资源实现VBA对文件的操作,包括:新建文件、打开文件、写入文件等以及实现自动添加超链接和新建sheet 相关下载链接:[url=//download.csdn.net/download/kongxun/2179559?utm_source=bbsseo]//download.csdn.net/download/kongxun/2179559?utm_source=bbsseo[/url]
JSP+Mysql网站留言板系统下载
JSP+Mysql网站留言板系统 实现分页显示等 相关下载链接:[url=//download.csdn.net/download/AlexSan/2811754?utm_source=bbsseo]//download.csdn.net/download/AlexSan/2811754?utm_source=bbsseo[/url]
CMMI与软件质量管理下载
了解企业实施CMMI的目的 了解CMMI 理解CMMI质量管理的基本理念 了解CMMI所包含的质量管理的实践和要求。 明确以提高产品质量为目的的项目质量管理所涵盖的内容和方法 相关下载链接:[url=//download.csdn.net/download/ad1997/3470219?utm_source=bbsseo]//download.csdn.net/download/ad1997/3470219?utm_source=bbsseo[/url]
我们是很有底线的