K*n
2 楼
class X{};
X f() {return X();}
void g1(X&) {}
void g2(const X&) {}
int main()
{
g1(f());
g2(f());
return 0;
}///:~
//----------------------------------
thinking in c++里说main函数的第一行
g1(f())
是illegal的,因为f()在直接调用的时候,将建立一个临时量,而且是const,g1()因
此无法用它当参数。
可是我在VC++ 6.0里边编译通过了并且运行了啊
请教到底是怎么回事
谢谢!
X f() {return X();}
void g1(X&) {}
void g2(const X&) {}
int main()
{
g1(f());
g2(f());
return 0;
}///:~
//----------------------------------
thinking in c++里说main函数的第一行
g1(f())
是illegal的,因为f()在直接调用的时候,将建立一个临时量,而且是const,g1()因
此无法用它当参数。
可是我在VC++ 6.0里边编译通过了并且运行了啊
请教到底是怎么回事
谢谢!
g*6
3 楼
本人是一名SPECIAL EDUCATION Major STUDENT 而我老板的研究方向主要是 students
with learning disability of math problem solving。
我刚来的时候是硕士,老板也是同意我直博的。但是后来系里的录取系统改革了,现在
直博要由FACULTY COMMITEE来审核。加上我有2个学期成绩不是很理想,让一些教授对
我意见颇大。现在老板希望我重新写一个PS来convince这些教授我有能力也有兴趣成为
一名PHD学生,所以希望有相关方向的牛人能给我些HINTS让我能写出一个AWESOME的PS
来让人刮目想开。
360度旋转拜谢!!
with learning disability of math problem solving。
我刚来的时候是硕士,老板也是同意我直博的。但是后来系里的录取系统改革了,现在
直博要由FACULTY COMMITEE来审核。加上我有2个学期成绩不是很理想,让一些教授对
我意见颇大。现在老板希望我重新写一个PS来convince这些教授我有能力也有兴趣成为
一名PHD学生,所以希望有相关方向的牛人能给我些HINTS让我能写出一个AWESOME的PS
来让人刮目想开。
360度旋转拜谢!!
l*d
4 楼
一般说来1年之内肯定绿了~
S*1
6 楼
bless……
k*f
8 楼
You code compiles clean in VC++ 2008 Express, but failed g++ 3.3.4 with such
error message:
x.cpp: In function `int main()':
x.cpp:11: error: invalid initialization of non-const reference of type 'X&'
from
a temporary of type 'X'
x.cpp:5: error: in passing argument 1 of `void g1(X&)'
error message:
x.cpp: In function `int main()':
x.cpp:11: error: invalid initialization of non-const reference of type 'X&'
from
a temporary of type 'X'
x.cpp:5: error: in passing argument 1 of `void g1(X&)'
h*t
9 楼
bless,bless
h*t
11 楼
多写你在research方面的建树,博士注重研究,具有强烈说服力的理论或研究成果会给
你加分的。
你加分的。
K*n
12 楼
嗯,明白了,谢谢!
such
'
【在 k**f 的大作中提到】
: You code compiles clean in VC++ 2008 Express, but failed g++ 3.3.4 with such
: error message:
: x.cpp: In function `int main()':
: x.cpp:11: error: invalid initialization of non-const reference of type 'X&'
: from
: a temporary of type 'X'
: x.cpp:5: error: in passing argument 1 of `void g1(X&)'
such
'
【在 k**f 的大作中提到】
: You code compiles clean in VC++ 2008 Express, but failed g++ 3.3.4 with such
: error message:
: x.cpp: In function `int main()':
: x.cpp:11: error: invalid initialization of non-const reference of type 'X&'
: from
: a temporary of type 'X'
: x.cpp:5: error: in passing argument 1 of `void g1(X&)'
L*k
13 楼
good luck!
K*n
16 楼
哦,了解了...
我是上大学的时候学MFC的课上老师distribute的VC6,后来好久不用,最近练练就拿出来
了.
好,换新版本...
多谢大家指点啦
我是上大学的时候学MFC的课上老师distribute的VC6,后来好久不用,最近练练就拿出来
了.
好,换新版本...
多谢大家指点啦
k*f
18 楼
For modern compilers, you can either download VC++ 2008 Express Edition free
at Microsoft, or Eclipse CDT at http://www.eclipse.org/cdt/, along with MingW.
【在 K****n 的大作中提到】
: 哦,了解了...
: 我是上大学的时候学MFC的课上老师distribute的VC6,后来好久不用,最近练练就拿出来
: 了.
: 好,换新版本...
: 多谢大家指点啦
K*n
19 楼
thx! 昨天下了
用 clr test.cpp /Za 就会报错
很是有趣啊,很是有趣
free
【在 k**f 的大作中提到】
:
: For modern compilers, you can either download VC++ 2008 Express Edition free
: at Microsoft, or Eclipse CDT at http://www.eclipse.org/cdt/, along with MingW.
用 clr test.cpp /Za 就会报错
很是有趣啊,很是有趣
free
【在 k**f 的大作中提到】
:
: For modern compilers, you can either download VC++ 2008 Express Edition free
: at Microsoft, or Eclipse CDT at http://www.eclipse.org/cdt/, along with MingW.
相关阅读
Questions from a frienddemand of teachers in NY State新手请教:关于教育博士的就业方向今天开始辅导一个小日本鬼子.ELEMENTARY SCHOOL TEACHER (zt)新的开始,痛苦的开始特殊教育的博士怎么样说说我的情况还是迷茫......请教一下大家这里好像读博士的人不多哎请问教育统计前景如何?What Teachers Love About the Job (zt)有没有人对OHIO的SPE EDU PROGRAMS比较熟悉的?问问,老师的绿卡几年可以下来?是不是比一般行业快点?咱几个多灌水,水大了,自然有人来的.说说TESOLMINNIE06:我问过一些MED单位PROGRAM,看到前面的问题.SPE EDU 的就业情况从哪里可以看到?大家帮我想想办法!!writing sample for application