+ -
当前位置:首页 → 问答吧 → C/C++
  • C++编程
    编写一个复数类complex并在复读数中添加如下功能:1一个不带参数的构造函数;2一个带两个参数的构造函数;3一个带两个参数并指定其默认值的设置函数4一个显示复数的函数如3+4i
    Jason_Zou523  时间:12-11 + 阅读全文
  • 为什么声明了友元函数还是不能访问私有变量?
    代码如下:classman:publicperson{friendistream&operator>>(istream&in,man&m); 。。。。。};istream&operator>>(istream&in,man&m){ in>>m.id; in>>m.na
    MOMENT_2000  时间:12-11 + 阅读全文
  • 做程序员是不是真的要天分啊
    我接触C语言到学习也两年多了,刚开始几乎没认真学过。不过从上个学期开始就从头开始学了。现在在看《C和指针》,看了这么久,发现后面的练习题稍微难一点就没有想法了。或者只有点朦胧的想法,写不出来。我现在大三了,想转行做程序员。当然那不是我的终极目标。但发现每天进展缓慢。我现在每天也没什么课。也算是比较努力去学了。现在一直担心毕业后如果干这行,能不能找的到工作啊!!
    conpgy  时间:12-11 + 阅读全文
  • 两个数组复制 为什么 总是输出汤
    #include<iostream>usingnamespacestd;constintn=100;intmain(){chara[n],b[n];inti,j;cout<<"输入数组a"<<endl;cin>>a;for(i=0;a[i]!='\0';i++);for(j=0;b[j]=='\0';j++){b[j
    Smallearth  时间:12-11 + 阅读全文
  • 对自己说声加油!
    从今天早上9点半到现在4点一直在电脑机房里写程序,有点累,但是很开心复习了switch语句的格式,原来switch下面要加个大括号,学会了用float(i/j)==float(i)/j判断是不是整数,接触了for的三重循环,知道了定义数组是要用个宏定义,以便以后扩展维护,复习了选择排序法,。。。。懂了好多,对自己说声,加油!加油!再加油!!!!!! 
    whc748227431whc  时间:12-11 + 阅读全文
  • 这个错误看不懂。。。。
    1>UDNMain.obj:errorLNK2005:"bool*visited"(?visited@@3PA_NA)已经在UDN.obj中定义1>UDNMain.obj:errorLNK2005:"int(__cdecl*VisitFunc)(structMGraph,int)"(?VisitFunc@@3P6AHUMGraph@@H@ZA)已
    a600577916  时间:12-11 + 阅读全文
  • 各位帮帮我吧,我的栈出问题了
    #include"stdio.h"#include"iostream.h"#defineMAXSIZE100typedefstruct{inttop;chardata[MAXSIZE];}SeqStack;intInit(SeqStack*s){s=newSeqStack;if(s==NULL){cout<<"error";return0;
    liufenghui365  时间:12-11 + 阅读全文
  • 如何理解 typedef void (CCmdTarget::* AFX_PMSG)(void) 中CCmdTarget后面的那个*号
    也就是typedefvoid(CCmdTarget::*AFX_PMSG)(void)和typedefvoid(CCmdTarget::AFX_PMSG)(void)有什么区别?
    ynnej_ivy  时间:12-11 + 阅读全文
  • 求帮忙修改
    #include<iostream>usingnamespacestd;classComplex{public:Complex(){real=0;imag=0;}Complex(doubler,doublei){real=r;imag=i;}Complexoperator+(Complex&c2); C
    youzhibc  时间:12-11 + 阅读全文
  • 关于front_inserter 和insert(str,str.begin())的区别
    C/C++code#include<iostream>#include<list>#include<algorithm>#include<iterator>usingnamespacestd;intmain(){list<int>ilst,ilst1,ilst2;for(inti=0;i!
    haofang666777  时间:12-11 + 阅读全文

热门应用

更多