Redian新闻
>
这个程序为什么不能运行?
avatar
这个程序为什么不能运行?# Programming - 葵花宝典
w*p
1
请联系鸿康的lisa
email:p********[email protected]
tel:86-21-54259873 86-21-54259875
fax:86-21-54259875
可用email把行程写清楚。
直飞航班中美探亲价格如下, 出发日期在30APR09前.MINIMUM STAY 1MONTH, MAXIMUM
STAY IS 6MONTHS,必须持有B2探亲签证
SHANGHAI-LOS ANGELES RMB3900+TAX(回程日期不得在01JUN-22AUG)
SHANGHAI-NEWYORK RMB6000+TAX(回程日期不得在01JUN-22AUG)
SHANGHAI-SAN FRANSISCO RMB3960+TAX
SHANGHAI-CHICAGO RMB5140+TAX
SHANGHAI-ATLANTA RMB4850+TAX
SHANGHAI-DETROIT RMB4840+TAX
BEIJING-LOS ANGELES
avatar
a*r
2
住家通勤皆可。简单家务和帮助照顾7个月大的小男孩,薪酬面议。请发邮件至yanping
.**[email protected] 谢谢。
avatar
j*j
3
class A
{
static int a;
public:
static ini(int b)
{
a=b;
}
};
int main()
{
A a1;
a1.ini(3);
}
报错:
const error LNK2001: unresolved external symbol "private: static int A::a" (
[email protected]@@0HA)
谢谢
avatar
p*e
4
同样的帖子啊,干吗发2遍呢
avatar
l*d
5
it seems you have to define a just below the class declaration:
int A::a;
then it should be ok.

【在 j*****j 的大作中提到】
: class A
: {
: static int a;
: public:
: static ini(int b)
: {
: a=b;
: }
: };
: int main()

avatar
l*g
6
tax is how much? give the final price please
avatar
l*d
7
The declaration of a static data member in the member list of a class is not
a definition. The definition of a static data member is equivalent to an
external variable definition. You must define the static member outside of
the class declaration in namespace scope.
For example:
class X
{
public:
static int i;
};
int X::i = 0; // definition outside class declaration
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。