From cae91a793cec40e20d1fbe12b07caf9d5018490c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 20 Nov 2021 22:50:45 +0000 Subject: (list)+first test with appends and output Main now uses append and cout mechanisms for a simple program! --- list.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/list.cpp b/list.cpp index 009ed9a..da9ad4f 100644 --- a/list.cpp +++ b/list.cpp @@ -46,5 +46,9 @@ std::ostream& operator<<(std::ostream& ostream, const List *lst) int main(void) { + auto lst = append(NULL, 1); + for (int i = 2; i < 10; ++i) + lst = append(lst, i); + std::cout << lst << std::endl; return 0; } -- cgit v1.2.3-13-gbd6f