/**(c) 2016 Michał (Foxbond) Chraniuk */
#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <iostream>
#include <conio.h>
using namespace std;
typedef struct elem {
char name[50];
int age;
struct elem *prev;
struct elem *next;
}elem;
elem *root = NULL;
void cls() {
system("cls");
}
void addElem(string name, int age);
void addPerson();
int main__() {
char opt;
do {
cls();
cout << "1. Dodaj osobe\n2. Wyswietl\n0. Wyjscie\n";
opt = _getch();
if (opt == '1') {
addPerson();
}
else if (opt == '2') {
printList();
}
} while (opt != '0');
return 0;
}
void addPerson() {
string imie;
int wiek;
cls();
cout << "Podaj imie: ";
cin >> imie;
cout << "\nPodaj wiek: ";
cin >> wiek;
addElem(imie, wiek);
}
void addElem(name, age) {
}
> Back