-
for example, if I have a c++ class, how can I initialize the class ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Welcome! A class is a class regardless which syntax is used to author it. So you just use it as usual, though See in particular: hello, world! and objects, initialization, and memory. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the link of the document. and I also found a perfect example code at https://github.com/hsutter/cppfront/blob/main/regression-tests/mixed-type-safety-1.cpp2 where class Shape { public: virtual ~Shape() { } };
class Circle : public Shape { }; and then
here |
Beta Was this translation helpful? Give feedback.
Welcome!
A class is a class regardless which syntax is used to author it. So you just use it as usual, though
new
is now a function call rather than a built-in language feature.See in particular: hello, world! and objects, initialization, and memory.