Redian新闻
>
这个房子能买吗?
avatar
这个房子能买吗?# Living
c*e
1
class A {
public:
virtual int foo()=0;
};
A::foo() { return 0; }
That is can we have a function as pure virtual function
and also have defination like above?
Justify your answer. If yes, then tell me one situation
where we use that. If not tell me why not.
avatar
j*w
2
看了一个房子,老公觉得可以,可我有些犹豫不决,主要担心下面的两个问题,想问问
这样的房子能买吗?
1. 第一个问题是朝向。这房子大门朝南,后院在北面,客厅朝南光线不错,厨房朝北
对着后院,饭厅的窗户在西面饭厅西晒,家庭间在北东西是三面玻璃南面连着饭厅,楼
上的主卧在西北面,朝着在北面的后院。
我总觉得这个房子要反过来朝向才好,担心光线和冬天冷的问题。我们在NJ, 这个房子
冬天会不会比较冷,光线除了客厅是不是都不好?看房子那天天气本来就不好,我们去
的也是快四点了,而且房子里开着灯,也看不出什么。
2. 第二个问题是后院,不只是朝北,而且不是平的,是斜坡的,这样的院子有小孩的
家庭是不是不愿意买,那我们以后会不会不好卖?后面不是山,也没有那么斜,可还是
斜坡着上去的,担心地下室容易进水,可对方讲没有进过水,而且我们在地下室看不出
潮湿,也没有味道,这个要房检再好好查了。可是即使地下室还好,后院也不平呀,除
草是不是不好弄,还有,这样的院子有小孩的家庭是不是不愿意买,那我们以后会不会
不好卖?
想听听大家的意见,谢谢。
avatar
t*t
3
我知道是有这种情况的。。
但是忘了为什么要这样。。
avatar
a*d
4
if in a good location, 朝北,斜坡 is not problem at all.
We had a TH 朝北, 斜坡, bought 515, 000 8 years ago, sold 585, 000 this year
.
it is fun to snow playing in the winter for kids.
avatar
z*8
5
我依稀记得只有destructor可以这么做吧

【在 t****t 的大作中提到】
: 我知道是有这种情况的。。
: 但是忘了为什么要这样。。

avatar
t*5
6
你们的房子朝向不是正好吗?坐北朝南?
后院是斜坡的话,我也不太喜欢,如果实在喜欢,坡度也不大的话,也不是一个大问题
,尤其如果视野开阔的话。
avatar
h*f
7
I think it wants to force the derived class to either "override/implement"
foo() or call A::foo(), so that A::foo() won't be called by accident.
avatar
w*r
8
我的经验是坐南朝北好,这样的朝向,在我们这里,通常family or living room至少一个
朝南,更重要的是主卧朝南,光线好,冬天暖和,后院也在南面,树长的好.当然,各地要看
情况.

【在 j********w 的大作中提到】
: 看了一个房子,老公觉得可以,可我有些犹豫不决,主要担心下面的两个问题,想问问
: 这样的房子能买吗?
: 1. 第一个问题是朝向。这房子大门朝南,后院在北面,客厅朝南光线不错,厨房朝北
: 对着后院,饭厅的窗户在西面饭厅西晒,家庭间在北东西是三面玻璃南面连着饭厅,楼
: 上的主卧在西北面,朝着在北面的后院。
: 我总觉得这个房子要反过来朝向才好,担心光线和冬天冷的问题。我们在NJ, 这个房子
: 冬天会不会比较冷,光线除了客厅是不是都不好?看房子那天天气本来就不好,我们去
: 的也是快四点了,而且房子里开着灯,也看不出什么。
: 2. 第二个问题是后院,不只是朝北,而且不是平的,是斜坡的,这样的院子有小孩的
: 家庭是不是不愿意买,那我们以后会不会不好卖?后面不是山,也没有那么斜,可还是

avatar
l*i
9
modern compiler should support explicit keyword.
avatar
d*n
10
不太好
avatar
f*2
11
虚函数是为了实现多态,纯虚函数是为了保证该方法必然实现多态,提供重写方法。实
现纯虚函数岂不是跟多态目的矛盾?从没见过这样例子
avatar
s*e
12
朝向要反过来才好
avatar
m*1
13
#include
class Base
{
public:
virtual void Fun()=0;
};
void Base::Fun()
{
cout<}
class Derived : public Base
{
public:
void Fun()
{
cout<Base::Fun( );
}
};
int main(int argc, char * const argv[])
{
Derived d;
Base *b = &d;
b->Fun();
return 0;
}
这种情况是可以的
avatar
d*c
14
I don't like it's orientation and slope in backyard.
Be patient, it is a big investment

【在 j********w 的大作中提到】
: 看了一个房子,老公觉得可以,可我有些犹豫不决,主要担心下面的两个问题,想问问
: 这样的房子能买吗?
: 1. 第一个问题是朝向。这房子大门朝南,后院在北面,客厅朝南光线不错,厨房朝北
: 对着后院,饭厅的窗户在西面饭厅西晒,家庭间在北东西是三面玻璃南面连着饭厅,楼
: 上的主卧在西北面,朝着在北面的后院。
: 我总觉得这个房子要反过来朝向才好,担心光线和冬天冷的问题。我们在NJ, 这个房子
: 冬天会不会比较冷,光线除了客厅是不是都不好?看房子那天天气本来就不好,我们去
: 的也是快四点了,而且房子里开着灯,也看不出什么。
: 2. 第二个问题是后院,不只是朝北,而且不是平的,是斜坡的,这样的院子有小孩的
: 家庭是不是不愿意买,那我们以后会不会不好卖?后面不是山,也没有那么斜,可还是

avatar
m*1
15
"Effective C++" Meyers mentions a reason for a pure virtual function to have
a body: Derived classes that implement this pure virtual function may call
this implementation smwhere in their code. If part of the code of two
different derived classes is similar then it makes sense to move it up in
the hierarchy, even if the function should be pure virtual.
ISO C++ 12.4 (7):
A destructor can be declared virtual (10.3) or pure virtual (10.4); if any
objects of that class or any derived class are created in the program, the
destructor shall be defined. If a class has a base class with a virtual
destructor, its destructor (whether user or implicitly declared) is virtual.
ISO C++ 10.4 (2):
A pure virtual function need be defined only if explicitly called with the
qualified id syntax (5.1).
avatar
T*R
16
这不正是坐北朝南吗?
肯定是大门冲南好。北方的话,冬天小雪车库门前的路都不用扫雪了,太阳出来雪就话
了。
avatar
c*e
17
On Item 7, page 43 of "Effective C++", Meyers mentioned a situation you want
to use a pure virtual destructor, that is when you want a class to be
abstract but you do not have a virtual function. You can make the destructor
pure virtual.
Meyers claimed: you must provide a definition for the pure virtual
destructor!
Why? simple. The destructor of base class will be called.

have
call
virtual.

【在 m********1 的大作中提到】
: "Effective C++" Meyers mentions a reason for a pure virtual function to have
: a body: Derived classes that implement this pure virtual function may call
: this implementation smwhere in their code. If part of the code of two
: different derived classes is similar then it makes sense to move it up in
: the hierarchy, even if the function should be pure virtual.
: ISO C++ 12.4 (7):
: A destructor can be declared virtual (10.3) or pure virtual (10.4); if any
: objects of that class or any derived class are created in the program, the
: destructor shall be defined. If a class has a base class with a virtual
: destructor, its destructor (whether user or implicitly declared) is virtual.

avatar
a*a
18
朝北, 斜坡 is OK.
your comment is great.

【在 T*R 的大作中提到】
: 这不正是坐北朝南吗?
: 肯定是大门冲南好。北方的话,冬天小雪车库门前的路都不用扫雪了,太阳出来雪就话
: 了。

avatar
B*5
19
话说destructor可以pure吗?
avatar
T*R
20
斜坡我不喜欢。
但是我家是坐南朝北的。很羡慕对门邻居。
其实上班族厨房客厅平时都没人呆着,朝哪都无所谓。只要有一面朝南屋里就暖和多了
。暖气费用就省很多。

【在 a*****a 的大作中提到】
: 朝北, 斜坡 is OK.
: your comment is great.

avatar
q*x
21
yes, you can. the derived class can directly reuse the definition.

【在 c**********e 的大作中提到】
: class A {
: public:
: virtual int foo()=0;
: };
: A::foo() { return 0; }
: That is can we have a function as pure virtual function
: and also have defination like above?
: Justify your answer. If yes, then tell me one situation
: where we use that. If not tell me why not.

avatar
b*r
22
不理想。
厨房和家庭间朝南才好,这是你们今后活动的主要房间。
后院不平也不好。现在不漏水,是因为地下的排水管畅通。时间一长,排水管就会被泥
土堵住。一堵住,地下室就会有水。疏通或替换排水管非常贵,因为要挖地三尺。
avatar
g*y
23
冬天长的话,后院朝北不是很好,朝西或南比较好
你劳工都动心了,那就别怕麻烦, 再去做看几次, 选不同的时间去,光线好不好的要
你自己去看,去感觉
avatar
J*G
24
如果房子坐南朝北,但是客厅和主卧都是南北通的那种(就是每个房子即有南窗户,也
有北窗户),冬天还会暖和么??
是不是正负抵消掉了??我在东北部,冬天很冷。
这个房子正门超北,院子朝南,有什么好处么?院子超南的好处我想不到,但是正门朝
北的话,车库和门前的雪白天融化的慢,晚上会结冰的对么??
avatar
f*0
25
我们刚买的院子在北的房子,因为我们在南方,夏天太热,所以感觉这样的好,现在天
气有点凉了,我们在楼上朝南的房间住,挺舒服的,夏天就去住朝北的主卧。个人觉得
房间的朝向还是挺影响温度的,北面的房间确实温度要低一些,采光也不好。院子感觉
还好,还是很多阳光的。
avatar
j*w
26
谢谢各位的意见,我们再考虑一下吧,我要让老公来看看这个帖子。谢谢。
avatar
c*6
27
大门朝向不重要,日常活动的厨房,family room,后院朝阳才重要。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。