月无踪
月无踪
人生就如心电图,一帆风顺说明你挂了。
关注数: 45
粉丝数: 207
发帖数: 8,876
关注贴吧数: 34
真NM后悔啊 是这样的,这个女生我是上一学年在自习室自习时碰巧碰见的,感觉很好。那是在新校区时的事,她每次都在一个固定的教室里自习,上一学年我只要自习也去那个教室。但是从来没和她说过话。这次开学,我们搬到新校区了,部分专业没有搬过来,来的这段时间我很是后悔,当初怎么没主动搭讪她。直到昨天晚上10点多,我从自习室出来,突然看到她和同学一起往寝室走,说实话,我很兴奋,目送她回寝室了。今天晚上从自习室出来,和昨天差不多时间,等了好久,也没见她啊,学校这么大,怎么找她啊,希望接下来有机会遇到她吧,每天晚上自习室出来,不信等不到 以前没谈过恋爱,也没追过女生,求鄙视啊
汉诺塔问题 将x的n个圆盘移到z可分为将n-1个圆盘先移到Y,然后将第n个盘移到z,接着再将Y上的n-1个盘移到Z; 递归
数据结构基本概念和术语 两种不同物理结构(存储结构):顺序,链式; 数据类型是一个值的**和定义在这个值**上的一组操作的总称。如整型变量其值集为某个区间上的整数,定义在其上的操作为加,减,乘,除和取模等算术运算。 为了提高软件的复用率,在近代程序设计方法学中指出,一个软件系统的框架应建立在数据之上,而不是建立在操作之上。
小白实至名归啊,恭喜小白,大家都来变为白吹吧
为控制台程序加上颜色-转自Erbi_lucifer吧 每个数字可以为以下任何值之一: 0 = 黑色 8 = 灰色 1 = 蓝色 9 = 淡蓝色 2 = 绿色 A = 淡绿色 3 = 浅绿** = 淡浅绿色 4 = 红色 C = 淡红色 5 = 紫色 D = 淡紫色 6 = 黄色 E = 淡黄色 7 = 白色 F = 亮白色 如果没有给定任何参数,该命令会将颜色还原到 CMD.EXE 启动时的颜色。这个值来自当前控制台窗口、/T 命令行开关或DefaultColor 注册表值。
如果喜欢的女生比自己高怎么办?说真的 ,来点建议,不管是谁,都来发言吧
目测吧里没有谁比我现在淡定 在面对黑与吹上
我是集锦迷我会乱说?梅吹才是真球迷
linkage directives
位域,volatile限定符 位域: 当程序需要传递二进制数据给另一个程序或者硬件时可以使用位域。A bit-field must be an integral data type. It can be either signed or unsigned We indicate that a member is a bit-field by following the member name with a colon and a constant expression specifying the number of bits storage compaction:if possible, packed within adjacent bits of the same integer. Whether and how the bits are packed into the integer is machine-dependent.Bit-fields with more than one bit are usually manipulated using the built-in bitwise operators.The address-of operator (& ) cannot be applied to a bit-field, so there can be no pointersreferring to class bit-fields. Nor can a bit-field be a static member of its class.
Ordinarily it is best to make a bit-field an unsigned type Ordinarily it is best to make a bit-field an unsigned type. Thebehavior of bit-fields stored in a signed type is implementation-defined.
构造析构函数的调用
U cannot *define* a function within another。 U cannot *define* a function within another but u can *declare*.
枚举判别式
嵌套类可以引用外围类的。 静态成员,类型名和枚举成员。
就金球哥那签名图,他竟然没被永封
想买部lt26i水货,多少钱啊?
问一下,蛋疼数码这家店买水货可信吗?
吧里有人买手机买过港货或者欧水吗? 求传授经验,有淘宝店推荐下么?么么哒
问一下,港货,欧水还有行货有啥区别 那个最便宜,淘宝上的一般都是什么?
请问一下,淘宝上的港货能相信么? 求推荐
任意一个一流射手都爆罗尼,我罗就是个抢点型抱大腿de 求别黑,首页又拿我罗和那些超级射手比,我们罗迷都觉得不好意思了
指针函数表
类成员的指针 string Screen::*ps_Screen=&Screen::contents;Screen::index Screen::*pindex;pindex=&Screen::width;指向成员 函数的指针:char (Screen::*pmf)()const=&Screen::get;为指向函数get()的指针。
部分省会城市和直辖市平均工资,看下你拖后腿了吗?
关于dynamic_cast 若类B派生于类A,类C派生于类B;都有虚函数 A *pa = new C; B * pb = dynamic_cast<B *>(pa); //我知道,pa指向一个C对象,可以看作一个B对象,这个转换完后pa实际指向B对象。 也就是说dynamic_cast不仅静态指针类型要变,完成后动态类型是不是一定要与静态类型一致?
各种类型转换 dynamic_cast: RTTI的操作符,当为downcast时进行运行时类型转换。 指针:A类与B类必须含有虚函数。 A *PA=new B; B *PB=dynamic_cast<B*>(PA);//作用是将PA的静态和动态类型都转换为B*. ,首先验证转换是否有效,当PA实际指向B时,成功。当PA实际指向A时,验证转换无效,PB=0; 引用:当RA引用CA时,抛出std::bad_cast的异常,引用CB时,运行正常。
听闻萨吧有人骂巴神怎么不用手啊?
闹钟定错了,现在醒了,擦
Catchedobj
operator new和显示调用析构函数 显示调用析构函数只会撤销对象,而不会去掉内存。 //<type*>后面的括号不能少 type* newelements=static_cast<type*>(operator new [](newcapacity*sizeof(type))); //--p的括号也不能少 (--p)->~type();
调用标准库函数的问题 C++primer指出:接受类类型形参(或类类型指针或者引用形参)的且与类本身定义在同一命名空间中的函数(包括重载操作符),在用类类型对象(或类类型的引用及指针)作为实参的时候是可见的。 但是operator new和operator delete两个函数也属于std,我显示调用没有指定using std::operator new[];为什么编译器不报错?
为什么限制allocator类的construct只能使用复制构造函数 因为allocator类提供的是可感知类型的内存分配,这样限制,可以获得更高的类型安全性
push_back
summary The exception object exists until the last handler for the exception completes. Function try blocks are used most often to wrap constructor definitions in order to catch exceptions thrown by constructor initializers.
虚基类构造顺序
多重继承时派生类实例优先级高于共享虚基类实例 输出C.
That abstract class manages the condition state of the stream and holds the buffer that the stream reads or writes.
多重继承下的查找 出现二义性,来个人讲下呗。
多重继承名字查找 出现二义性
假如中国出了个香球王级别的人物,并带领国足进入世界杯 他和姚明的历史地位孰高孰低?
大家看英超都用什么看啊? 我习惯看新浪直播
怎么理解using指示 (ps:在全局作用域中定义的)这种情况下using指示是不是使Exercise命名空间成员提升到全局作用域?既然这样,为什么ivar不属于重复定义?
using指示 namespace Exercise{int ival=0;double dvar=0;const int limit=1000;}int ivar=0;using namespace Exercise; 不会产生重复定义,但是改为using声明会产生重复定义
因异常而退出函数时 先撤销在异常发生之前创建的所有对象,接着会释放内存
定义函数模板特化几乎总是比定义非模板函数更好 定义函数模板特化几乎总是比定义非模板函数更好
特化出现在对该模板实例的调用之后是错误的? 在能够声明或定义特化之前,它所特化的模板的声明必须在作用域中。类似地,在调用模板的这个版本之前,特化的声明必须在作用域中: // define the general compare template template <class T> int compare(const T& t1, const T& t2) { /* ... */ } int main() { // uses the generic template definition int i = compare("hello", "world"); // ... } // invalid program: explicit specialization after call template<> int compare<const char*>(const char* const& s1, const char* const& s2) { /* ... */ } This program is in error because a call that would match the specialization is made before the specialization is declared. When the compiler sees a call, it must know to expect a specialization for this version. Otherwise, the compiler is allowed to instantiate the function from the template definition. 这个程序有错误,因为在声明特化之前,进行了可以与特化相匹配的一个调用。当编译器看到一个函数调用时,它必须知道这个版本需要特化,否则,编译器将可能从模板定义实例化该函数。A program cannot have both an explicit specialization and an instantiation for the same template with the same set of template arguments. 对具有同一模板实参集的同一模板,程序不能既有显式特化又有实例化。 It is an error for a specialization to appear after a call to that instance of the template has been seen. 特化出现在对该模板实例的调用之后是错误的。
理性预测,如果卡西守门,你射10个点球 目测我能进2个
泛型句柄类对用来实例化的类型的限制 用来实例化的类型不能为没有继承类耳朵抽象类
模板非类型形参 14.3.2 Template non-type arguments [temp.arg.nontype] 1 A template-argument for a non-type, non-template template-parameter shall be one of: — an integral constant-expression of integral or enumeration type; or — the name of a non-type template-parameter; or — the address of an object or function with external linkage, including function templates and function template-ids but excluding non-static class members, expressed as & id-expression where the & is optional if the name refers to a function or array, or if the corresponding template-parameter is a reference; or — a pointer to member expressed as described in 5.3.1 .
引用不是对象 引用不是对象, 定义引用不会导致实例化
某些吧友,说我数学绝对差哦,秀智商下限哦 地址:http://tieba.baidu.com/p/1788558857 我只是不想给罗尼招黑,他就说我秀下限,还打赌说我数学肯定差。
萨迷被代表就是冤枉,罗吹被代表就是喜闻乐见 ,中不?
当形参为引用时,若实参为数组,数组名不会转换为指针
sort算法不改变迭代器的位置 std::vector<int>::iterator first=ivec.begin(); std::vector<int>::iterator last=ivec.end(); sort(first,last);
向空文件中写入值时,运行后若控制台界面不关 数据还未写入,只有关了后才能写入。这点文件流和标准输出流不一样,求解。
这个吧怎么这么冷清 不知道为什么啊?难道有和这个吧同名的吧比较火?
向空文件中写入值时,运行后若控制台界面不关, 数据还未写入,只有关了后才能写入。这点文件流和标准输出流不一样,求解。
重构refactoring 对类进行重构时,一般需要将数据或函数成员移到继承层次的最高公共点以避免代码重复
派生类默认构造函数会默认先调用基类默认构造函数, 无论是否显式调用了会调用A();
首页
5
6
7
8
9
10
下一页