Redian新闻
>
efile怎么知道是TSC还是NSC?
avatar
efile怎么知道是TSC还是NSC?# Immigration - 落地生根
a*f
1
A phone interview question. I said using reinterpret_cast, but he said no.
Does any one know the correct answer? I wasn't a CS major so I know little
about fundamental C++.
avatar
c*t
2
很混乱,求救!!!
准备efile但刚看了个帖子说efile一定是TSC。
但人在加州,一直都是按照NSC准备的,很多材料包括推荐信都按要求加上了service
center的title。如果寄到TSC但材料上写的是NSC会不会有问题?
还是说efile以后要等到receipt、知道是哪个center之后,改过材料再寄?
avatar
C*y
3
直接强制转换就行了
比如说加(int *)
如果在C++中的话,可以加static_cast

【在 a****f 的大作中提到】
: A phone interview question. I said using reinterpret_cast, but he said no.
: Does any one know the correct answer? I wasn't a CS major so I know little
: about fundamental C++.

avatar
l*5
4
EFILE只有TSC
avatar
a*f
5
Thanks.
Then was my answer (reinterpret_cast) wrong? if so what's wrong with it?

【在 C***y 的大作中提到】
: 直接强制转换就行了
: 比如说加(int *)
: 如果在C++中的话,可以加static_cast

avatar
i*u
6
efile一定是TSC。 你重新打印一下你的材料不就完了吗。就算不改也没关系。不用但
avatar
d*d
7
I agree with you. in c++, we should use reinterpret_cast.

【在 a****f 的大作中提到】
: Thanks.
: Then was my answer (reinterpret_cast) wrong? if so what's wrong with it?

avatar
c*t
8
多谢!材料很多,全都写上NSC了,看来要改一阵了

【在 i******u 的大作中提到】
: efile一定是TSC。 你重新打印一下你的材料不就完了吗。就算不改也没关系。不用但
: 心

avatar
l*g
9
reinterpret_cast和直接用hard cast都应该可以啊
(至于得到的 pointer address是不是有效,那是另一回事)
如果反过来,把pointer convert 成 int, 那得考虑是32位还是64位的系统。如果是64
位的,那convert to int 会有loss

【在 a****f 的大作中提到】
: A phone interview question. I said using reinterpret_cast, but he said no.
: Does any one know the correct answer? I wasn't a CS major so I know little
: about fundamental C++.

avatar
l*g
10
static_cast不行的
static_cast必须在匹配的类型之间,不能把bits随意cast成任何类型

【在 C***y 的大作中提到】
: 直接强制转换就行了
: 比如说加(int *)
: 如果在C++中的话,可以加static_cast

avatar
C*y
11
试了一下
的确不行
什么样才叫匹配的类型?
谢谢

【在 l*****g 的大作中提到】
: static_cast不行的
: static_cast必须在匹配的类型之间,不能把bits随意cast成任何类型

avatar
r*g
12
就是float->int, char->int这类的吧,编译器可以自动转换的类型,加上static cast
是为了防止
bug和理解方便。

【在 C***y 的大作中提到】
: 试了一下
: 的确不行
: 什么样才叫匹配的类型?
: 谢谢

avatar
C*y
13
thanks

cast

【在 r********g 的大作中提到】
: 就是float->int, char->int这类的吧,编译器可以自动转换的类型,加上static cast
: 是为了防止
: bug和理解方便。

avatar
F*r
14
static_cast can be used when the compiler can do the conversion
automatically(with a warning msg). imho reinterpret_cast is the only way. no
?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。