In this tutorial, we will learn how to implement a Linear Search Data Structure in C++ using some of the OOP concepts such as Classes, Methods, and also making instances (objects).
This will enable us to interact with our program via the Command-Line of the IDE to run and play around with our code sample.
What we can do with this code snippet:
- We can insert the number of items we want to add into our Linear Search Array
- We can insert the list of items(in this case numbers)
- We can search for the position of a particular number that has already been inserted by the user
- We will be prompted whether or not we want to add more items or end the program
Code Snippet Below:
cout<<"\nEnter element to search:";