/dynamic_List

Kendim için hazırladığım ve geliştirmekte olduğum List sınıfı

Primary LanguageC++

dynamic_List

List list; -> Default size=0 array;
List list(5); -> size=5 array;
list.Clear(); -> all variable = 0;
list.Reset(); -> delete all variables but class is not deleted
list.Get(3); -> Returns the value in list number 3
list.Set(3,5); -> list number 3 variable change to 5
list.Print(); -> All array value print console
list.Print(5); -> Starts at number 5 and console print to the end of the series
list.Print(5,10); -> Starts at number 5 and goes to number 10 console print
list.Size(); -> return list size
list.Add(4); -> Adds the value 4 to the end of the list
list.CheckItem(4); -> If there is 4 in the array it says true or false
list.Find(5); -> Tell where 5 is
list.AddIn(3,5); -> Adds the value 5 to the number 3 but does not delete the value at number 3. Moves forward

Simple
int main(){
         List<int> list1;
          List<int> list2;
          list1.Add(7);
          list1.Add(8);
          list1.Add(9);
          list1.Add(10);
          list2.Add(1);
          list2.Add(2);
          list2.Add(3);
          list2.Add(4);
          list2.Add(5);
          list2.Add(6);
          List<int> res;
          res=list1+list2;
         res.Print();
         return 0;
}