#include <iostream>
using namespace std;
int main()
{
struct list
{
char name[20];
int age;
double height;
list *next;
};
list *first, *temp, *temp2, *newlist1;
first->next = temp;
temp->next = temp2;
newlist1 = new list;
newlist1->name = "Steve";
newlist1->age = 23;
newlist1->height = 2.3;
newlist1->next = temp2;
temp->next = newlist1;
newlist1->next = temp2;
temp->next = newlist1;
temp2 = newlist1->next;
temp2->next = newlist1->next;
delete temp2;
cout << " Name is: " << newlist1->name << " ";
cout << " Age is: " << newlist1->age << " ";
cout << " Height is: " << newlist1->height;
}
이름 값을 노드에 할당하는 방법은 무엇입니까? ... strcpy를 시도했지만 strcpy가 선언되지 않았다고 계속 말하고 있습니다. 누군가 제발 노드에 이름 [20] char 유형을 할당하는 방법에 대한 코드를 보여 주시겠습니까? 나는이 문제에 정말로 문제가있다 : (노드 이름을 지정하는 방법은 무엇입니까?
... 주어진 정당한 이유없이 제기 된 질문에 실제로 응답하는 정답에 대한 하향식? 좋은. – KevenK