Lion1942
Lion1942
关注数: 5
粉丝数: 30
发帖数: 1,065
关注贴吧数: 11
求大神,这是什么车?
看图猜车,有没有大神!
看图猜车,有没有大神
pycharm怎么使用jython 今天在pycharm中试了下写jython,发现pycharm好像不支持jython,是不是需要安装?
java初始化块 初学java,有个问题不解,既然java类可以直接给成员变量赋初始值,为什么还要初始化块?
诚心请教这三个是什么字 有没有认识的,非常感谢!
Handler问题请教 小弟刚开始学习Android开发,之前有过C/C++基础,没有Java基础,学起来有些吃力,看书上有个例子,在创建Handler对象时,重写了其方法handlerMessage,不太明白为什么可以这样实现,不是只有继承类才能重写父类的方法么?请大神帮忙解答! Handler handler = new Handler(){ public void handlerMessage(Message msg){ if(msg.what == 0x12333){ ... } } };
头文件包含的问题求解 代码如下,Function.h文件,如果没有#include <vector>这句的话会报错,但是不包含string头文件却没错,为什么? Function.h #include <vector> #define MAX_CHARACTER_NUMBER 9 class CQueue{ public: CQueue(); ~CQueue(); void InputString(); void DivisionString(); void OutputString(); private: std::string strList; std::vector<std::string> m_vecList; int m_nListCount; char m_aCharater[MAX_CHARACTER_NUMBER]; }; Function.cpp #include "stddef.h" #include <stdio.h> #include <iostream> #include <vector> #include <string> #include <set> #include "Function.h" using std::set; using std::iterator; using std::cin; using std::cout; using std::endl; using std::vector; using std::string;
求适配Iphone6的壁纸 求高清图,感谢!
【i5壁纸】求壁纸 大神快出现啊!
【i5壁纸】求这两张的原始壁纸 之前见过这两张壁纸,任务是在中间的,不知道哪位大神有,不胜感激!
求壁纸 求这张原始壁纸,非常感谢!
跑步壁纸 大家都是什么壁纸,有没有跑步的,分享下!
吧里有人在用运动臂带的没,推荐个! 找了好久也没有看着顺眼的,不知道吧里有人用没
Iphone5s去哪儿卖划算 3月22日买的A1530黑,用了不到一个月,感觉自己不太喜欢黑色的,想卖了换个白色的,不知道去哪儿卖划算些,还有能卖多少钱,没有磕碰,没有划伤,配件齐全,请大家给指点下,万分感谢!
求外壳 刚入手黑色Iphone5s,感觉好瘦,细长,有没有什么外壳可以让5s看起来不那么瘦的,求支招!
求大神帮忙啊,搞不定啊! 预先的打算是这样的: 1.建立MFC单文本程序 2.从.txt文件中读取文本文件到string对象,然后保存于容器 3.将读取到的文本文件按顺序显示到主界面 4.用户可以使用鼠标点击的方式选中一行或多行,只点击选择,不需要其他操作 5.获取用户选择的行,从容器中删除这些行 6.将处理后的文本文件重新写回到.txt文件中 现在的问题: 1.读取文件,保存文件已经完成 2.使用CListBox的方式显示读取到的文件 3.为了处理窗口重绘的问题,将数据显示的步骤写在了视类的OnDraw函数中,但是会出现Debug错误 以下为源码,请各位帮忙看下存在的问题,或者有其他比较好的解决方案的,也请帮忙提出来,万分感谢! 注: m_pListBox定义为视类的成员,在构造函数中进行初始化: CPlatFormView::CPlatFormView() { // TODO: 在此处添加构造代码 m_pListBox = new CListBox(); } void CPlatFormView::OnDraw(CDC* pDC) { CPlatFormDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) return; // TODO: 在此处为本机数据添加绘制代码 if (!m_vecBuffer.empty()) { //按行输出容器内数据到主界面 CRect rect; GetClientRect(&rect); m_pListBox->Create(LBS_MULTIPLESEL | WS_VSCROLL | WS_HSCROLL, rect, this, IDC_AWCLEAR_LISTBOX); m_pListBox->InitStorage(400, 10230); m_pListBox->ShowWindow(SW_SHOWNORMAL); /*this->SetHorizontalExtent(1000);*/ vector<DATA>::iterator beg = m_vecBuffer.begin(); while (beg != m_vecBuffer.end()) { string strUTF8 = beg->sData; string strAnsi = CCharacterChange::UTF8_To_STRING(strUTF8); wstring wsUnicode = CCharacterChange::AnsiToUnicode(strAnsi); m_pListBox->AddString(wsUnicode.c_str()); beg++; } } }
激活手机错误 “无法激活 我们尝试在不打扰您的情况下激活你的手机,但出现了问题,因此我们需要获得更多信息才能继续” 什么意思,已经在电脑上申请了live.com邮箱,而且可以正常登入,手机上登陆就提示这个错误,怎么解决?
请教下桌面空间位置的问题 如图,为什么桌面控件离最上面还有这么长一段距离感觉特别丑,有没有办法让控件顶着屏幕最上沿?
请教个问题! 请教下如何用MFC向“我的电脑窗口的地址栏里写入地址?” 比如现在已经开启了“我的电脑”,怎么向地址栏里写入“d:\\file”?
大神们,救命啊! M列的数据跟A列的数据比较,如果相同。把M与A相同那一行M之后的数据全部放到A所在那一行的M之后。 该怎么做,求大神帮帮忙啊!
ASCII码组成字符串 比如说,我要定义一个BYTE类型字符串: BYTE* pStr; 然后这个字符串中第一个字符为10,第二个为11,第三个为12,这儿的10,11,12指的是在内存中的值,该怎么定义?
遨游老是在新标签中打开搜索结果 为什么,IE中不管百度还是谷歌都是点击搜索后在当前页面中显示结果的,可是遨游会重新开启一个标签栏,显示结果,原来的搜索页面主页还在,在“选项->标签栏->标签打开”中“ 在新标签中打开搜索栏搜索结果页 ”是未选定的状态啊,也没有中木马,什么原因???
单件导出类问题 DLL中定义: box.h class _declspec(dllexport) box{ public: box(){}; double volume(); static box* Init(); static box* pbox; }; box.cpp box* box::pbox = 0; double box::volume() { return 10; } box* box::Init() { if(pbox==0) { pbox = new box(); } return pbox; }; 程序中定义: 定义box.h头文件,不定义源文件: box.h class _declspec(dllimport) box{ public: box(){}; double volume(); static box* Init(); static box* pbox; }; 在调用函数中获取到插件实例: HINSTANCE m_hInst = LoadLibrary("DLL名称"); //可以正常获取 typedef box* (*m_pFunction)(); typedef double (*pVolume)(); m_pFunction pFun = (m_pFunction)GetProcAddress(m_hInst,"Init"); //可以获取 box* pbox = (*PFun)(); //可以取得 int number = pbox->volume(); //此处出错,为什么? 报错: 无法解析的外部符号 "__declspec(dllimport) public: unsigned int __thiscall CMSInterfaceFacade::Volume(void)" (__imp_?Volume@CMSInterfaceFacade@@QAEIXZ),该符号在函数 "public: void __thiscall CProbeTestDlg::OnBnClickedOk(void)" (?OnBnClickedOk@CProbeTestDlg@@QAEXXZ) 中被引用
单件导出类问题 DLL中定义: box.h class _declspec(dllexport) box{ public: box(){}; double volume(); static box* Init(); static box* pbox; }; box.cpp box* box::pbox = 0; double box::volume() { return 10; } box* box::Init() { if(pbox==0) { pbox = new box(); } return pbox; }; 程序中定义: 定义box.h头文件,不定义源文件: box.h class _declspec(dllimport) box{ public: box(){}; double volume(); static box* Init(); static box* pbox; }; 在调用函数中获取到插件实例: HINSTANCE m_hInst = LoadLibrary("DLL名称"); //可以正常获取 typedef box* (*m_pFunction)(); typedef double (*pVolume)(); m_pFunction pFun = (m_pFunction)GetProcAddress(m_hInst,"Init"); //可以获取 box* pbox = (*PFun)(); //可以取得 int number = pbox->volume(); //此处出错,为什么?
天哪... 等了这么长时间,终于等到了,耐着性子看完,想了半天,喊出两个字:天哪... 先不说剧情没看懂,光是那满地乱爬的蜘蛛装贞子就不知道导演怎么想出来的,唉,跟老版的真是天壤之别啊,唉,失望...
友情通知! 通知一下,已经出DVD了,大家到快播里搜下就有了,昨天更新的!
索尼新款笔记本 感觉目前索尼的笔记本转轴好丑,还没有之前的SR系列的转轴好看,不知道下一个新款笔记本会用什么转轴,还有什么时候会出新品?
生成动态链接库时报错... 如下,从动态链接库中导出类时提示错误,请教下是什么原因? DLL.H #ifdef DLL_API #else #define DLL_API _declspec(dllimport) DLL_API int sum(int a,int b); DLL_API int ave(int a,int b); class DLL_API point{ public: int output(int a,int b); }; #endif DLL.CPP #ifndef DLL_API #define DLL_API _declspec(dllexport) #include "DLL11.h" DLL_API int sum(int a,int b){ return a+b;} DLL_API int ave(int a,int b){return a*b;} DLL_API int point::output(int a,int b){return a-b;}; #endif 报错误:dll11.cpp(13) : error C2653: 'point' : is not a class or namespace name
类模板中如何实例化char类型指针成员? 比如定义一个模板类: template<class T> class box{ public: box(T pstr); ~box(); private: T pmentral; }; 如果T为一个char*,那么构造函数中如何去初始化pmentral? 正常情况下应给如下定义: box(char* pstr) { pmentral=new char[strlen(pstr)+1]; strcpy(pmentral,pstr); }; 那模板中应该如何实现? 感谢!
模板类重载后置++运算符不起作用... 今天写了个迭代器的模板类,其中重载了后置++,可是写完后发现不起作用,代码如下,麻烦各位帮忙瞧瞧是什么原因! //迭代器类 #ifndef ITERATOR_H #define ITERATOR_H template<class T>class Iterator{ public: Iterator():p(0){}; Iterator(T* point):p(point){}; ~Iterator(){}; Iterator(const Iterator<T>& c):p(c.p){}; Iterator<T>& operator=(const Iterator<T>& c); T operator*(); Iterator<T>& operator++(); //前置++,-- Iterator<T>& operator--(); const Iterator<T> operator++(int); //后置++,-- const Iterator<T> operator--(int); const Iterator<T> operator+(int a); private: T* p; }; template<class T> Iterator<T>& Iterator<T>::operator=(const Iterator<T>& c) { if(p!=c.p) delete p; p=c.p; return *this; }; template<class T> T Iterator<T>::operator*() { return (*p); }; template<class T> Iterator<T>& Iterator<T>::operator++() { p++; return *this; }; template<class T> Iterator<T>& Iterator<T>::operator--() { p--; return *this; }; template<class T> const Iterator<T> Iterator<T>::operator++(int) //后置++ { Iterator it(*this); it.p++; return it; }; template<class T> const Iterator<T> Iterator<T>::operator--(int) //后置-- { Iterator it(*this); it.p-=1; return it; }; template<class T> const Iterator<T> Iterator<T>::operator+(int a) { Iterator<T> it(*this); it.p+=a; return it; }; #endif #include "Iterator.h" #include <iostream> using namespace std; int sum(Iterator<int> begin,Iterator<int> end) //累加函数 { int result=0; while(begin!=end) { result+=*begin; begin++; //此处++根本不起作用 } return result; }; int main() { int numbers[]={1,2,3,4,5,6,7,8,9,10}; Iterator<int> it(numbers); cout<<"The result is: "<<sum(it,it+10)<<endl; }
万能的魔兽世界吧啊,帮我解开问题吧!
大家注意了,不要上当了啊! 现在吧里出现了很多高清种子的,但是要求在获得种子之前要么下载软件,要么注册账户,在这里提醒下各位,这种绝对是骗人的,就是为了增加他们那种垃圾聊天室的会员数量,所以不要轻易去下载任何软件,也不要去注册什么会员,大家试想下,如果他们都有高清种子,为什么不放几个高清截图上来(我说的是截图,不是海报图片),所以不要傻呵呵的去被人骗了,顺便说下:片子***...
大神帮忙啊! 自己写了个模拟迭代器,用vector容器时可以通过.begin()获取到vector容器内对象的指针,为什么用list容器时无法获取到其对象的指针?代码如下,求各位大神们帮忙分析下,小弟不胜感激!#include <iostream>#include #include <list>#include #include <algorithm>#include using namespace std;template class box{ //////////////////boxprivate:iter height;iter length;iter wideth;public:box(iter heightvalue=0,iter lengthvalue=0,iter widethvalue=0);box(const box& abox);iter volume();box& operator=(const box& abox);bool operator<(const box& abox);iter getheight()const{return height;};iter getlength()const{return length;}; iter getwideth()const{return wideth;};void setheight(iter heightvalue)const{height=heightvalue;}; void setlength(iter lengthvalue)const{length=lengthvalue;};void setwideth(iter widethvalue)const{wideth=widethvalue;};};templatebox::box(iter heightvalue,iter lengthvalue,iter widethvalue):height(heightvalue),length(lengthvalue),wideth(widethvalue){};templatebox::box(const box& abox){height=abox.height;length=abox.length;wideth=abox.wideth;};templateiter box::volume(){return height*length*wideth;};templatebox& box::operator=(const box& abox){ this->setheight(abox.getheight())const;this->setlength(abox.getlength())const;this->setwideth(abox.getwideth())const;return *this;};templatebool box::operator<(const box& abox){return this->voluem() ////////////////cartonclass carton:public box{private:inter pmentral;public://carton(inter pstr="paple");carton(iter heightvalue=0,iter lengthvalue=0,iter widethvalue=0,inter pstr="paple"); carton(const carton& acarton); carton& operator=(const carton& acarton);inter getmentral()const{return pmentral;};void setmentral(inter pstr)const{pmentral=new inter[strlen(pstr)+1];strcpy(pmentral,pstr);};};/*templatecarton::carton(inter pstr){pmentral=new inter[strlen(pstr)+1];strcpy(pmentral,pstr);};*/templatecarton::carton(iter heightvalue,iter lengthvalue,iter widethvalue,inter pstr):box(heightvalue,lengthvalue,widethvalue){ pmentral=new char[strlen(pstr)+1];strcpy(pmentral,pstr);};templatecarton::carton(const carton& acarton):box(acarton){ pmentral=new char[strlen(acarton.getmentral())+1];strcpy(pmentral,acarton.getmentral());};templatecarton& carton::operator=(const carton& acarton){ this->setheight(acarton.getheight())const;this->setlength(acarton.getlength())const;this->setwideth(acarton.getwideth())const;this->setmentral(acarton.getmentral())const;return *this;};template ///////////////////iterclass iters:public iterator{private:intel aintel;public:iters(intel tintel);iters(const iters& titer);~iters(){};iters& operator=(const iters& titer);bool operator<(const iters& titer); intel operator*();intel operator[](size_t index);iters& operator++(); iters& operator--(); bool operator!=(const iters& tintel)const;intel getaintel()const{return aintel;};void setaintel(intel tintel){aintel=tintel;};};templateiters::iters(intel tintel){aintel=tintel;};templateiters::iters(const iters& titer){aintel=tintel.aintel;return *this;};templateiters& iters::operator=(const iters& aiter){ this->setaintel(aiter.
请教vector问题 请教下各位大哥,vector的参数是不是都必须是确定类型的,如果使用模板类类型的参数可不可以? 例:首先定义了类模板 template<class iter,class inter> class carton{}; 然后在main函数中定义容器: vector<carton<iter,inter>> cartons(10); 这样可不可以?
cin输入问题 如下代码,在要求输入判断字符ch时,程式自动将ch赋值为112 'p',直接跳过,请教下各位原因! carton* carton::createlist() { carton* head=NULL; carton* end=head; carton* pstr; char ch=0; cout<<"Please input a mentral about a carton!"<<endl; do{ double heightvalue=0,lengthvalue=0,widethvalue=0; cin>>heightvalue>>lengthvalue>>widethvalue; string* mentral=new string; getline(cin,*mentral); pstr=new carton(heightvalue,lengthvalue,widethvalue,*mentral); if(head==NULL) head=pstr; else end->next=pstr; end=pstr; cout<<"Do you want to input again?"<<endl; cin>>ch; ////////此处出现错误 }while(tolower(ch)=='y'); end->next=NULL; phead=head; return head; };
在线等,帮忙看看啊 如下定义了两个类,一个基类,一个派生类,然后定义了一个拍成类对象的链表,但是当使用getline(cin,astring)函数输入string成员时无法读取(getline第三个参数为默认),但当把getline()函数第三个参数设置为某一个字符(如:getline(cin,astring,'#')时,可以读入,为什么? class box{ protected: double height; double length; double wideth; public: box(double heightvalue,double lengthvalue,double widethvalue); box(); box(const box& abox); box& operator=(const box& abox); virtual double volume(); bool operator<(box& abox); friend double getwideth(box& abox); static double getlength(box& abox); double showvolume(); double getheight()const{return height;}; double getlength()const{return length;}; double getwideth()const{return wideth;}; }; class carton:public box{ public: string* pmentral; carton* next; double getheight(); carton(string pstr="paple"); carton(double heightvalue,double lengthvalue,double widethvalue,string pstr="paple",carton* next=NULL); carton(const carton& acarton); void getmentral(const carton& acarton); double volume(); double showvolume(); carton* createlist(); }; carton* carton::createlist() { carton* head=NULL; carton* end=head; carton* ps; char ch; cout<<"Please input the value of the carton!"<<endl; string astring; do{ double heightvalue=0; double lengthvalue=0; double widethvalue=0; cin>>heightvalue; cin>>lengthvalue; cin>>widethvalue; getline(cin,astring); //此处为何读取不了输入的字符串??? cout<<astring; ps=new carton(heightvalue,lengthvalue,widethvalue,astring); if(head==NULL) { head=ps; } else { end->next=ps; } end=ps; cout<<"Do you want to input again?"<<endl; cin.ignore(1024,'\n'); cin>>ch; cout<<endl; }while(ch=='y'||ch=='Y'); end->next=NULL; // ps->next=NULL; // delete ps; return head; };
高手看看什么原因 #include <iostream> using namespace std; class time{ public: int day; int month; int year; time(int dayvalue,int monthvalue,int yearvalue); time(); //time2(); int getday(){return day;}; int getmonth(){return month;}; int getyear(){return year;}; }thisday,thatday,thirdday; int main() { time thisday(30,12,2010); time *pthisday=&thisday; time time[5]; time[0]=thisday; cout<<"This day is:" <<endl <<time->getyear() <<" years " <<endl <<time->getmonth() <<" months " <<endl <<time->getday() <<" days " <<endl; time thatday(24,10,2012); //thatday.day=24; //thatday.month=10; //thatday.year=2012; time[1]=thatday; cout<<"Thatday is : " <<endl <<(time+1)->getyear() <<" years " <<endl <<(time+1)->getmonth() <<" months " <<endl <<(time+1)->getday() <<" days " <<endl; cout<<"This day is : " <<endl <<pthisday->getyear() <<" years " <<endl <<pthisday->getmonth() <<" months " <<endl <<pthisday->getday() <<" days " <<endl; return 0; } time::time(int dayvalue,int monthvalue,int yearvalue) { cout<<"This program has be repalyed!" <<endl; day=dayvalue; month=monthvalue; year=yearvalue; } time::time() { cout<<"This program has be replayed!" <<endl; day=month=year=1; } --------------------Configuration: 对象 - Win32 Debug-------------------- Compiling... 对象.cpp D:\VC文件\对象.cpp(33) : error C2146: syntax error : missing ';' before identifier 'thatday' D:\VC文件\对象.cpp(33) : error C2064: term does not evaluate to a function 执行 cl.exe 时出错. 对象.obj - 1 error(s), 0 warning(s)
什么问题? 高手帮忙看看这段代码有什么问题,为什么执行后会出现“程序已停止工作”的错误提示? #include <iostream> using namespace std; double ave(double values[],int count); int main() { const int number=10; double array[]={0}; int i=0; char ch=0; do{ cout<<"Please input a number!" <<endl; cin>>array[i++]; cout<<"Do you want to input again?" <<endl; cin>>ch; }while(i<=number && ch=='y'); if(i>number) { cout<<"Sorry,you can not input any more!" <<endl; exit(1); } double result=ave(array,i); cout<<"The result of these number's average is:" <<result <<endl; return 0; } double ave(double values[],int count) { double sum=0; for(int j=0;j<=count;j++) { sum+=values[j]; } return sum/count; }
拜求度爷 求度爷关闭WOW吧吧,一劳永逸,大家该干嘛干嘛去
我靠,被盗号了 刚朋友发信息说我在AG喊卖G,问我是不是被盗号了,日啊,该怎么办
还有5分钟12点,各位心里还有没有一丝期待? RT,讲真话
问一个关于SR16得问题。 看上了索尼的SR16,可价格好象有点小贵,想等价格降点了再入手,不知道这款最多能降到多少,得等多长时间,求各位朋友们帮忙分析分析,小弟不胜感激!
各位大哥救救小弟吧! 我机子上的卡巴斯基老是跳出来提示让升级,可每次升级都说不需要升级,为什么?
如果是中国人,不妨看一下! http://www.41me.com/dispbbs.asp?boardID=71&ID=11763&page=1
各位大哥,有没有步步在《HEAVEN》中的照片?弄几张来! 各位大哥,有没有步步在《HEAVEN》中的照片?弄几张来!
小弟的个人空间,欢迎大家来做客! http://spaces.msn.com/members/stepmeyujongfei/
小弟的MSNspace,欢迎大家光临!请多多指教! http://spaces.msn.com/members/stepmeyujongfei/
请问哪儿有步步FREE&EASY的MTV看! 请问哪儿有步步FREE&EASY的MTV看!
求助!!!!!!!!!!! 请问在哪儿可以找见后缀为MPEG的步步视频?
1
下一页