K
kiryazev
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
No. There can be no expression between the parentheses
following the bracketed expression in the 'new' expression.
It can only be
A* p = new A[10]();
"""Victor Bazarov ÐÉÓÁÌ(Á):
"""Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
No. There can be no expression between the parentheses
following the bracketed expression in the 'new' expression.
It can only be
A* p = new A[10]();
Could you please point to the relevant paragraph?
...
No. There can be no expression between the parentheses
following the bracketed expression in the 'new' expression.
It can only be
A* p = new A[10]();
Could you please point to the relevant paragraph?
...
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
Hello. Is the following code correct in standard c++?
struct A
{
A(){}
A(int){}
};
int main()
{
A* p = new A[10](99);
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.