Redian新闻
>
Condo doc 问题请教
avatar
Condo doc 问题请教# Living
P*b
1
define a function that takes a string
void func(string s);
and then call this function with a char*
int main()
{
char* s = "test";
fun(s);
}
function fun() will get called.
do you know how this happens behind the scene?
avatar
s*z
2
现在正在看condo documents,有两个问题想请教。
Master Deed 上面说
1)"the maximum residential occupancy of each two (2) bedroom Unit shall be
three (3) persons."
2)"Units may be leased by a Unit Owner, however, no Units shall be leased
for a term of less than one (1) year and only upon the approval of the Board
of Managers as the terms of lease."
请问这个condo的管理是不是很严格?如果因工作原因搬家,想把这个condo暂时租出去
会不会比较麻烦?还有,父母来探亲住几个月应该没问题吧?
谢谢啦!
avatar
t*i
3
string ( const char * s ); is used to construct a string object
avatar
s*z
4
up up
avatar
P*b
5
what's this called?
How it works behind the scene?

【在 t*******i 的大作中提到】
: string ( const char * s ); is used to construct a string object
avatar
h*b
6
seems pretty restrictive... the rules are there and once they discover any
violation, it would be up to the HOA to decide on consequence--usually give
warning first. temp stay by your parents should be ok but it also depends
on your neighbors--usually they initiate the reporting which triggers HOA's
investigation.

be
Board

【在 s****z 的大作中提到】
: 现在正在看condo documents,有两个问题想请教。
: Master Deed 上面说
: 1)"the maximum residential occupancy of each two (2) bedroom Unit shall be
: three (3) persons."
: 2)"Units may be leased by a Unit Owner, however, no Units shall be leased
: for a term of less than one (1) year and only upon the approval of the Board
: of Managers as the terms of lease."
: 请问这个condo的管理是不是很严格?如果因工作原因搬家,想把这个condo暂时租出去
: 会不会比较麻烦?还有,父母来探亲住几个月应该没问题吧?
: 谢谢啦!

avatar
t*i
7
string ( const char * s ) is a constructor
avatar
s*z
8
Thanks a lot!
Is it a typical term in Mater Deed?
Even a couple with two kids would violate this rule...

any
give
s

【在 h***b 的大作中提到】
: seems pretty restrictive... the rules are there and once they discover any
: violation, it would be up to the HOA to decide on consequence--usually give
: warning first. temp stay by your parents should be ok but it also depends
: on your neighbors--usually they initiate the reporting which triggers HOA's
: investigation.
:
: be
: Board

avatar
h*c
9
楼上说得这种现象在c++里叫temporary object.
也有可能是std::string 重载了type cast () operator.
可以看看_string 文件.
avatar
h*b
10
can't say whether typical or not--all depends on the community and the
complete terms of the agreement.
usually it targets new buyer of the prop. can't imagine if a family of 3
gets a new born and be kicked out. it wouldn't be reasonable...

【在 s****z 的大作中提到】
: Thanks a lot!
: Is it a typical term in Mater Deed?
: Even a couple with two kids would violate this rule...
:
: any
: give
: s

avatar
P*b
11
我还是不太清楚,为啥会产生这个临时变量呢?是什么机制导致的。

【在 h**********c 的大作中提到】
: 楼上说得这种现象在c++里叫temporary object.
: 也有可能是std::string 重载了type cast () operator.
: 可以看看_string 文件.

avatar
d*d
12
这个动作叫auto type conversion by conversion constructor.
大概就这么叫吧,可能不准确,不过几个关键字都有了.
发生的原因是,string有个constructor take const char *为input.

【在 P*******b 的大作中提到】
: define a function that takes a string
: void func(string s);
: and then call this function with a char*
: int main()
: {
: char* s = "test";
: fun(s);
: }
: function fun() will get called.
: do you know how this happens behind the scene?

avatar
a*1
13
google explicit
explicit void func(string s);
explicit可以阻止这种行为的发生,

【在 P*******b 的大作中提到】
: define a function that takes a string
: void func(string s);
: and then call this function with a char*
: int main()
: {
: char* s = "test";
: fun(s);
: }
: function fun() will get called.
: do you know how this happens behind the scene?

avatar
t*i
14
恩,我的意思也是这个。

【在 d*******d 的大作中提到】
: 这个动作叫auto type conversion by conversion constructor.
: 大概就这么叫吧,可能不准确,不过几个关键字都有了.
: 发生的原因是,string有个constructor take const char *为input.

avatar
f*t
15
不知道过程确切名称是什么,不过只要能说出explicit关键字的作用应该就算答对了

【在 a********1 的大作中提到】
: google explicit
: explicit void func(string s);
: explicit可以阻止这种行为的发生,

avatar
l*s
16
C++ jobs:
http://jobguiding.com/it-jobs/it-skills/c++.html

【在 P*******b 的大作中提到】
: define a function that takes a string
: void func(string s);
: and then call this function with a char*
: int main()
: {
: char* s = "test";
: fun(s);
: }
: function fun() will get called.
: do you know how this happens behind the scene?

avatar
w*x
17
According to Effective C++ chapter 0:
This is called "Implicit type conversion"
Define the constructor with key word explicit "explict string(const char *)"
will prohibit the implicit type conversion, but you can still do an
explicit type conversion by call func(string("test")).

【在 P*******b 的大作中提到】
: define a function that takes a string
: void func(string s);
: and then call this function with a char*
: int main()
: {
: char* s = "test";
: fun(s);
: }
: function fun() will get called.
: do you know how this happens behind the scene?

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