От: | rg45 | ||
Дата: | 03.05.23 06:46 | ||
Оценка: | +2 |
S>#include <iostream>
S>class C1
S>{
S>public:
S> const char* V1;
S>};
S>C1* fun2()
S>{
S> char t[2];
S> t[0] = 't';
S> t[1] = 0;
S> C1* c = new C1();
c->>V1 = t;
S> return c;
S>}
S>int main()
S>{
S> C1* t = fun2();
S> std::cout << t->V1 << "\n";
S>}
S>