diff --git a/da/dc3/linked__list_8cpp.html b/da/dc3/linked__list_8cpp.html index a082a41fe..6bebadbac 100644 --- a/da/dc3/linked__list_8cpp.html +++ b/da/dc3/linked__list_8cpp.html @@ -215,49 +215,52 @@ Here is the call graph for this function:
233 std::cout << "\n\nEnter you choice : ";
234 std::cin >> choice;
235 switch (choice) {
-
236 case 1:
-
237 std::cout << "\nEnter the element to be inserted : ";
-
238 std::cin >> s;
-
239
-
240 if (data_structures::linked_list::isDigit(s)) {
-
241 x = std::stoi(s);
-
242 l.push_back(x);
-
243 } else {
-
244 std::cout << "Wrong Input!\n";
-
245 }
-
246 break;
-
247 case 2:
-
248 std::cout << "\nEnter the element to be removed : ";
-
249 std::cin >> s;
-
250 if (data_structures::linked_list::isDigit(s)) {
-
251 x = std::stoi(s);
-
252 l.erase(x);
-
253 } else {
-
254 std::cout << "Wrong Input!\n";
-
255 }
-
256 break;
-
257 case 3:
-
258 std::cout << "\nEnter the element to be searched : ";
-
259 std::cin >> s;
-
260 if (data_structures::linked_list::isDigit(s)) {
-
261 x = std::stoi(s);
-
262 std::shared_ptr<data_structures::linked_list::link> found =
-
263 l.search(x);
-
264 } else {
-
265 std::cout << "Wrong Input!\n";
-
266 }
-
267 break;
-
268 case 4:
-
269 l.display();
-
270 std::cout << "\n";
-
271 break;
-
272 default:
-
273 std::cout << "Invalid Input\n" << std::endl;
+
236 case 0:
+
237 std::cout << "\nQuitting the program...\n";
+
238 break;
+
239 case 1:
+
240 std::cout << "\nEnter the element to be inserted : ";
+
241 std::cin >> s;
+
242
+
243 if (data_structures::linked_list::isDigit(s)) {
+
244 x = std::stoi(s);
+
245 l.push_back(x);
+
246 } else {
+
247 std::cout << "Wrong Input!\n";
+
248 }
+
249 break;
+
250 case 2:
+
251 std::cout << "\nEnter the element to be removed : ";
+
252 std::cin >> s;
+
253 if (data_structures::linked_list::isDigit(s)) {
+
254 x = std::stoi(s);
+
255 l.erase(x);
+
256 } else {
+
257 std::cout << "Wrong Input!\n";
+
258 }
+
259 break;
+
260 case 3:
+
261 std::cout << "\nEnter the element to be searched : ";
+
262 std::cin >> s;
+
263 if (data_structures::linked_list::isDigit(s)) {
+
264 x = std::stoi(s);
+
265 std::shared_ptr<data_structures::linked_list::link> found =
+
266 l.search(x);
+
267 } else {
+
268 std::cout << "Wrong Input!\n";
+
269 }
+
270 break;
+
271 case 4:
+
272 l.display();
+
273 std::cout << "\n";
274 break;
-
275 }
-
276 } while (choice != 0);
-
277 return 0;
-
278}
+
275 default:
+
276 std::cout << "Invalid Input\n" << std::endl;
+
277 break;
+
278 }
+
279 } while (choice != 0);
+
280 return 0;
+
281}
std::cin
std::cout
std::string