Блог пользователя _cian

Автор _cian, история, 6 лет назад, По-английски
This part of the code is given:

struct Node 
{
    int data;
    struct Node* next;
    Node(int x) { data = x;  next = NULL; }
};
to make a new node which keywords i have to use in c++?

is it :
Node* new_node=new Node()(This is not working)
or somethings

  • Проголосовать: нравится
  • -7
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

see http://www.cplusplus.com/doc/tutorial/classes/

The part where it is about "Constructors".