Redian新闻
>
有婚后独自买房子的女子吗?
avatar
有婚后独自买房子的女子吗?# Money - 海外理财
l*8
1
我用c++写了如下代码:
#include
using namespace std;
....
if (ithrow out_of_range;
}
我的程序在Visual c++ 2008 express edition编译是通过的,但在leetcode上面编译
错误。 错误信息是: “ 'out_of_range' was not declared in this scope”
这是怎么回事?
avatar
s*t
2
和老公不在一个洲,自己买房子,写自己一个人的名字,有这样的吗?
如果以后离婚,这个房产还要和老公分吗?
avatar
l*a
3
no idea
旁边帖子里面有个google c++ style guide的link
我扫了一眼,说是也不支持exception

【在 l*********8 的大作中提到】
: 我用c++写了如下代码:
: #include
: using namespace std;
: ....
: if (i: throw out_of_range;
: }
: 我的程序在Visual c++ 2008 express edition编译是通过的,但在leetcode上面编译
: 错误。 错误信息是: “ 'out_of_range' was not declared in this scope”
: 这是怎么回事?

avatar
P*D
4
非法律专业人士。应该是要分。
avatar
l*8
5
谢谢提醒。 编译器应该有turn on/off exception的参数的。想必leetcode把
exception handling turn off 了。

【在 l*****a 的大作中提到】
: no idea
: 旁边帖子里面有个google c++ style guide的link
: 我扫了一眼,说是也不支持exception

avatar
c*2
6
just replace female with male, husband with wife in your post and think what
the answer should be.
avatar
i*e
7
不支持。
用 assert() 就可以。
如果 assert() 里的 expression 是false的话,就会 runtime error.

【在 l*********8 的大作中提到】
: 谢谢提醒。 编译器应该有turn on/off exception的参数的。想必leetcode把
: exception handling turn off 了。

avatar
l*8
8
谢谢回答。 我以后在leetcode不用exception就是了。

【在 i**********e 的大作中提到】
: 不支持。
: 用 assert() 就可以。
: 如果 assert() 里的 expression 是false的话,就会 runtime error.

avatar
i*e
9
其实 C++ 里面的所有 #include 都会自动被删除掉,而被取代的是一个已经定义好的
precompiled include header file。
因为我很懒,不喜欢打代码还要include一堆 header.
Java 没有实现这个功能,所以要自己 import java.xx.*;

【在 l*********8 的大作中提到】
: 谢谢回答。 我以后在leetcode不用exception就是了。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。