{"id":14828,"date":"2023-07-23T14:39:50","date_gmt":"2023-07-23T09:09:50","guid":{"rendered":"http:\/\/myprojectideas.com\/?p=14828"},"modified":"2025-10-10T11:43:59","modified_gmt":"2025-10-10T11:43:59","slug":"canteen-management-system-with-c","status":"publish","type":"post","link":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/","title":{"rendered":"Canteen Management System with C++"},"content":{"rendered":"<p>In today&#8217;s busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. Canteens play a vital role in providing meals and refreshments to people. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution. This computerized system streamlines tasks like menu planning, inventory control, and sales tracking, making canteen operations smoother and more organized.<\/p>\n<iframe loading=\"lazy\"  id=\"_ytid_95379\"  width=\"1080\" height=\"607\"  data-origwidth=\"1080\" data-origheight=\"607\" src=\"https:\/\/www.youtube.com\/embed\/aePrpQNCdQY?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe>\n<h2><a id=\"post-14828-_grtphbq27cbh\"><\/a><strong>Introduction<\/strong><\/h2>\n<p>This canteen management system with C++ has the functionality for managing the canteen&#8217;s inventory and employee details. The login mechanism differentiates between owners and employees and provides access to their respective functionalities. This system also streamlines the process of reserving and confirming the food items.<\/p>\n<p>We will learn how to write source code for the Canteen Management System with C++ and how to implement it through this project. The user can do various operations, such as order certain food items and modify the order.<\/p>\n<h2><a id=\"post-14828-_medsfwn2niqr\"><\/a><strong>Objectives<\/strong><\/h2>\n<ul>\n<li>To order various food items conveniently<\/li>\n<li>To manage the canteen menu by adding and deleting the available items<\/li>\n<li>To keep employee records properly and safely<\/li>\n<li>To lessen human error<\/li>\n<li>To provide transparency to the system<\/li>\n<\/ul>\n<h2><a id=\"post-14828-_gtgkedbvlaai\"><\/a><strong>Requirements<\/strong><\/h2>\n<ul>\n<li>To run this project, you must have installed IDE for running and compiling the C++ source code.<\/li>\n<li><a href=\"https:\/\/www.bloodshed.net\/\">Dev C++<\/a>, <a href=\"https:\/\/sourceforge.net\/projects\/codeblocks\/\">Code Blocks<\/a>, or <a href=\"https:\/\/code.visualstudio.com\/\">VS code<\/a> is recommended for a better experience.<\/li>\n<li>Windows 10 operating system (or any latest version)<\/li>\n<\/ul>\n<h2><a id=\"post-14828-_2lvdyf43d3vd\"><\/a><strong>Source Code<\/strong><\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">#include&lt;iostream&gt;\r\n\r\n#include&lt;fstream&gt;\r\n\r\n#include&lt;windows.h&gt;\r\n\r\n#include&lt;dos.h&gt;#include&lt;iostream&gt;\r\n\r\n#include&lt;fstream&gt;\r\n\r\n#include&lt;windows.h&gt;\r\n\r\n#include&lt;dos.h&gt;\r\n\r\n#include&lt;stdio.h&gt;\r\n\r\n#include&lt;cstdlib&gt;\r\n\r\n#include&lt;string&gt;\r\n\r\n#include&lt;conio.h&gt;\r\n\r\nusing namespace std;\r\n\r\nCOORD coordinate={0,0};\r\n\r\nvoid gotoxy(int x,int y)\r\n\r\n{\r\n\r\ncoordinate.X=x;\r\n\r\ncoordinate.Y=y;\r\n\r\nSetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coordinate);\r\n\r\n}\r\n\r\nclass store_manage\r\n\r\n{\r\n\r\npublic:\r\n\r\n\r\n\r\n\r\nvoid store_var_page()\r\n\r\n{\r\n\r\nstorepageandswitch();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nint canteen_flag=0,number=0;\r\n\r\nchar canteen_index[5];\r\n\r\nstruct canteenmanage{\r\n\r\nchar ind[5],\r\n\r\nitem_id[5],\r\n\r\nitem_name[20],\r\n\r\ncost[20],\r\n\r\nquantity[20],\r\n\r\nrating[5];\r\n\r\n}can[20];\r\n\r\nstruct secind{\r\n\r\nchar item_name[20],\r\n\r\nitem_id[5],\r\n\r\nind[5];\r\n\r\n}sec[20],found[20];\r\n\r\nstruct index{\r\n\r\nchar item_id[20],ind[20];\r\n\r\n}in[20],temp;\r\n\r\nvoid sort_index()\r\n\r\n{\r\n\r\nint i,j;\r\n\r\nfor(i=0;i&lt;number-1;i++)\r\n\r\nfor(j=0;j&lt;number-i-1;j++)\r\n\r\nif(strcmp(in[j].item_id,in[j+1].item_id)&gt;0)\r\n\r\n{\r\n\r\ntemp =in[j];\r\n\r\nin[j]=in[j+1];\r\n\r\nin[j+1]=temp;\r\n\r\n}\r\n\r\n}\r\n\r\nvoid sort_secind()\r\n\r\n{\r\n\r\nint i,j;\r\n\r\nsecind temp;\r\n\r\nfor(i=0;i&lt;number-1;i++)\r\n\r\nfor(j=0;j&lt;number-i-1;j++)\r\n\r\nif(strcmp(sec[j].item_name,sec[j+1].item_name)&gt;0)\r\n\r\n{\r\n\r\ntemp =sec[j];\r\n\r\nsec[j]=sec[j+1];\r\n\r\nsec[j+1]=temp;\r\n\r\n}\r\n\r\nelse if(strcmp(sec[j].item_name,sec[j+1].item_name)==0)\r\n\r\n{\r\n\r\nif(strcmp(sec[j].item_id,sec[j+1].item_id)&gt;0)\r\n\r\n{\r\n\r\ntemp =sec[j];\r\n\r\nsec[j]=sec[j+1];\r\n\r\nsec[j+1]=temp;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid ret_rec(char *ind)\r\n\r\n{\r\n\r\nint flag=0;\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(can[i].ind,ind)==0)\r\n\r\n{\r\n\r\nstrcpy(canteen_index,ind);\r\n\r\ncanteen_flag=1;\r\n\r\ncout&lt;&lt;\"Your Item is found\\n\";\r\n\r\ncout&lt;&lt;can[i].item_id&lt;&lt;\"|\"&lt;&lt;can[i].item_name&lt;&lt;\"|\"&lt;&lt;can[i].cost&lt;&lt;\"|\"&lt;&lt;can[i].quantity&lt;&lt;\"|\"&lt;&lt;can[i].rating&lt;&lt;\"\\n\";\r\n\r\nflag=1;\r\n\r\n}\r\n\r\n}\r\n\r\nif(!flag)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"sorry the Item search has been failed\\n\";\r\n\r\n}\r\n\r\n}\r\n\r\nvoid search_index(char *item_id)\r\n\r\n{\r\n\r\nint flag=0;\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(in[i].item_id,item_id)==0)\r\n\r\n{\r\n\r\nret_rec(in[i].ind);\r\n\r\nflag=1;\r\n\r\n}\r\n\r\n}\r\n\r\nif(!flag)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"sorry Index search has been failed\\n\";\r\n\r\n}\r\n\r\n}\r\n\r\nvoid search(char *it_name)\r\n\r\n{\r\n\r\nchar it_id[20];\r\n\r\nint flag1=0;\r\n\r\nint k=0,i;\r\n\r\nfor(i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(sec[i].item_name,it_name)==0)\r\n\r\n{\r\n\r\nstrcpy(found[k].item_id,sec[i].item_id);\r\n\r\nstrcpy(found[k].item_name,sec[i].item_name);\r\n\r\nstrcpy(found[k].ind,sec[i].ind);\r\n\r\nflag1=1;\r\n\r\nk++;\r\n\r\n}\r\n\r\n}\r\n\r\nif(!flag1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"second index search has been failed\\n\";\r\n\r\nreturn;\r\n\r\n}\r\n\r\ncout&lt;&lt;\"\\n The records which are matched are:\";\r\n\r\nfor(i=0;i&lt;k;i++)\r\n\r\ncout&lt;&lt;\"\\n\"&lt;&lt;found[i].item_name&lt;&lt;\" \"&lt;&lt;found[i].item_id;\r\n\r\ncout&lt;&lt;\"\\n Please select an Item ID \";\r\n\r\ncin&gt;&gt;it_id;\r\n\r\nflag1=0;\r\n\r\nfor(i=0;i&lt;k;i++)\r\n\r\nif(strcmp(found[i].item_id,it_id)==0)\r\n\r\n{\r\n\r\nsearch_index(it_id);\r\n\r\nflag1=1;\r\n\r\n}\r\n\r\nif(!flag1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"Wrong item ID entered search has been failed\\n\";\r\n\r\n}\r\n\r\n}\r\n\r\nint search_item(char *it_id,int j)\r\n\r\n{\r\n\r\nint flag=0;\r\n\r\nfor(int i=0;i&lt;j;i++)\r\n\r\n{\r\n\r\nif(strcmp(can[i].item_id,it_id)==0)\r\n\r\n{\r\n\r\nflag=1;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\nif(flag)\r\n\r\nreturn 1;\r\n\r\nelse\r\n\r\nreturn -1;\r\n\r\n}\r\n\r\nvoid del(char *it_name)\r\n\r\n{\r\n\r\ncanteen_flag=0;\r\n\r\nint fr=0;\r\n\r\nsearch(it_name);\r\n\r\nif(!canteen_flag)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"Sorry Deletion has failed\\n\";\r\n\r\nreturn;\r\n\r\n}\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(can[i].ind,canteen_index)==0)\r\n\r\n{\r\n\r\nfr=i;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\nfor(int i=fr;i&lt;number-1;i++)\r\n\r\n{\r\n\r\ncan[i]=can[i+1];\r\n\r\nchar str[3];\r\n\r\nsprintf(str,\"%d\",i);\r\n\r\nstrcpy(can[i].ind,str);\r\n\r\n}\r\n\r\nnumber--;\r\n\r\n\r\n\r\n\r\nfstream f1,f2,f3;\r\n\r\nf1.open(\"canteen1.txt\",ios::out);\r\n\r\nf2.open(\"index.txt\",ios::out);\r\n\r\nf3.open(\"secind.txt\",ios::out);\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nstrcpy(sec[i].item_name,can[i].item_name);\r\n\r\nstrcpy(sec[i].item_id,can[i].item_id);\r\n\r\nstrcpy(in[i].item_id,can[i].item_id);\r\n\r\nstrcpy(sec[i].ind,can[i].ind);\r\n\r\nstrcpy(in[i].ind,can[i].ind);\r\n\r\n}\r\n\r\nsort_index();\r\n\r\nsort_secind();\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nf1&lt;&lt;can[i].ind&lt;&lt;\"|\"&lt;&lt;can[i].item_id&lt;&lt;\"|\"&lt;&lt;can[i].item_name&lt;&lt;\"|\"&lt;&lt;can[i].cost&lt;&lt;\"|\"&lt;&lt;can[i].quantity&lt;&lt;\"|\"&lt;&lt;can[i].rating&lt;&lt;\"\\n\";\r\n\r\nf2&lt;&lt;in[i].item_id&lt;&lt;\"|\"&lt;&lt;in[i].ind&lt;&lt;\"\\n\";\r\n\r\nf3&lt;&lt;sec[i].item_name&lt;&lt;\"|\"&lt;&lt;sec[i].item_id&lt;&lt;\"|\"&lt;&lt;sec[i].ind&lt;&lt;\"\\n\";\r\n\r\n}\r\n\r\nf1.close();\r\n\r\nf2.close();\r\n\r\nf3.close();\r\n\r\ncout&lt;&lt;\"your deletion has been successful\";\r\n\r\n}\r\n\r\n\r\n\r\n\r\nvoid orderfood()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"\\nROSE CANTEEN\";\r\n\r\ngotoxy(40,2);\r\n\r\nint choice,i,flag1,flag;\r\n\r\nfstream file1,file2,file3;\r\n\r\nchar ind[5],\r\n\r\nit_id[20],\r\n\r\nit_name[20],\r\n\r\nitem_id[5],\r\n\r\nitem_name[20],\r\n\r\ncost[20],\r\n\r\nquantity[20],\r\n\r\nrating[5];\r\n\r\nfile3.open(\"index.txt\",ios::out);\r\n\r\nfile1.open(\"canteen1.txt\",ios::app|ios::out);\r\n\r\nfile2.open(\"secind.txt\",ios::out);\r\n\r\nif(!file1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"Sorry your file could not be added\";\r\n\r\nexit(0);\r\n\r\n}\r\n\r\nint n;\r\n\r\ncout&lt;&lt;\"\\nEnter the total number of food items\\n\";\r\n\r\ncin&gt;&gt;n;\r\n\r\nfor(int i=number;i&lt;number+n;i++)\r\n\r\n{\r\n\r\nlabel: cout&lt;&lt;\"\\n Please Enter \"&lt;&lt;i+1&lt;&lt;\" the name of the item:\\n\";\r\n\r\ncout&lt;&lt;\"Please Enter the Item's id:\"; cin&gt;&gt;can[i].item_id;\r\n\r\ncout&lt;&lt;\"Please Enter the name of the Item:\"; cin&gt;&gt;can[i].item_name;\r\n\r\ncout&lt;&lt;\"Please Enter Cost of the item :\"; cin&gt;&gt;can[i].cost;\r\n\r\ncout&lt;&lt;\"Please Enter Quantity of item:\"; cin&gt;&gt;can[i].quantity;\r\n\r\ncout&lt;&lt;\"Please Enter rating of the item:\"; cin&gt;&gt;can[i].rating;\r\n\r\nint q=search_item(can[i].item_id,i);\r\n\r\nif(q==1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"This is a duplicate entry,Please Enter again\\n\";\r\n\r\ngoto label;\r\n\r\n}\r\n\r\nfile1&lt;&lt;i&lt;&lt;\"|\"&lt;&lt;can[i].item_id&lt;&lt;\"|\"&lt;&lt;can[i].item_name&lt;&lt;\"|\"&lt;&lt;can[i].cost&lt;&lt;\"|\"&lt;&lt;can[i].quantity&lt;&lt;\"|\"&lt;&lt;can[i].rating&lt;&lt;\"\\n\";\r\n\r\n}\r\n\r\nfile1.close();\r\n\r\nnumber=number+n;\r\n\r\nfile1.open(\"canteen1.txt\",ios::in);\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nfile1.getline(ind,5,'|');\r\n\r\nfile1.getline(item_id,5,'|');\r\n\r\nfile1.getline(item_name,20,'|');\r\n\r\nfile1.getline(cost,20,'|');\r\n\r\nfile1.getline(quantity,20,'|');\r\n\r\nfile1.getline(rating,5,'\\n');\r\n\r\nstrcpy(can[i].ind,ind);\r\n\r\nstrcpy(sec[i].ind,ind);\r\n\r\nstrcpy(in[i].ind,ind);\r\n\r\nstrcpy(sec[i].item_name,item_name);\r\n\r\nstrcpy(sec[i].item_id,item_id);\r\n\r\nstrcpy(in[i].item_id,item_id);\r\n\r\n}\r\n\r\nsort_index();\r\n\r\nsort_secind();\r\n\r\ncout&lt;&lt;\"\\n Secondary index has been sorted the components are:\\n\";\r\n\r\nfor(i=0;i&lt;number;i++)\r\n\r\ncout&lt;&lt;sec[i].item_name&lt;&lt;\" \"&lt;&lt;sec[i].item_id&lt;&lt;\" \"&lt;&lt;sec[i].ind&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\"\\nThe index has been sorted its components are:\\n\";\r\n\r\nfor(i=0;i&lt;number;i++)\r\n\r\ncout&lt;&lt;in[i].item_id&lt;&lt;\" \"&lt;&lt;in[i].ind&lt;&lt;endl;\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\nfile2&lt;&lt;sec[i].item_name&lt;&lt;\"|\"&lt;&lt;sec[i].item_id&lt;&lt;\"|\"&lt;&lt;sec[i].ind&lt;&lt;\"\\n\";\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\nfile3&lt;&lt;in[i].item_id&lt;&lt;\"|\"&lt;&lt;in[i].ind&lt;&lt;\"\\n\";\r\n\r\n\r\n\r\n\r\nfile1.close();\r\n\r\nfile2.close();\r\n\r\nfile3.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to procced in the system\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nvoid bill()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);\r\n\r\nint choice,i,flag1,flag;\r\n\r\nfstream file1,file2,file3;\r\n\r\nchar ind[5],\r\n\r\nit_id[20],\r\n\r\nit_name[20],\r\n\r\nitem_id[5],\r\n\r\nitem_name[20],\r\n\r\ncost[20],\r\n\r\nquantity[20],\r\n\r\nrating[5];\r\n\r\nfstream f1;\r\n\r\nf1.open(\"canteen1.txt\",ios::in);\r\n\r\nif(!f1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"File not found\";\r\n\r\nexit(0);\r\n\r\n}\r\n\r\ncout&lt;&lt;\"\\nID NAME COST QUANTITY RATINGS\\t\\n\\n\";\r\n\r\ni=0;\r\n\r\nwhile(i!=number)\r\n\r\n{\r\n\r\nf1.getline(ind,5,'|');\r\n\r\nf1.getline(item_id,5,'|');\r\n\r\nf1.getline(item_name,20,'|');\r\n\r\nf1.getline(cost,20,'|');\r\n\r\nf1.getline(quantity,20,'|');\r\n\r\nf1.getline(rating,5,'\\n');\r\n\r\ncout&lt;&lt;\"\\n\"&lt;&lt;item_id&lt;&lt;\"\\t\"&lt;&lt;item_name&lt;&lt;\"\\t\\t\"&lt;&lt;cost&lt;&lt;\"\\t\"&lt;&lt;quantity&lt;&lt;\"\\t\"&lt;&lt;rating&lt;&lt;\"\\t\\n\";\r\n\r\ni++;\r\n\r\n}\r\n\r\nint totalcost=0;\r\n\r\ncout&lt;&lt;\"\\nThe total number of food items that have been ordered are :\"&lt;&lt;i&lt;&lt;\"\\n\";\r\n\r\nfor(int f=i-1;f&lt;0;f--)\r\n\r\n{\r\n\r\ntotalcost=totalcost+ (cost[f]*quantity[f]);\r\n\r\ncout&lt;&lt;totalcost;\r\n\r\n}\r\n\r\ncout&lt;&lt;\"\\nPlease make a payment of Rs.70\"&lt;&lt;totalcost&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" THANK YOU \\n\";\r\n\r\n\r\n\r\n\r\nf1.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to proceed.....\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nvoid foodsearch()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\\n\";\r\n\r\ngotoxy(40,2);\r\n\r\nchar it_name[20];\r\n\r\ncout&lt;&lt;\"\\nEnter Item name to be searched\\n\";\r\n\r\ncin&gt;&gt;it_name;\r\n\r\nsearch(it_name);\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to proceed.....\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\nvoid deletefood()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);\r\n\r\nchar it_name[20];\r\n\r\ncout&lt;&lt;\"\\nEnter the Item name to be deleted\\n\";\r\n\r\ncin&gt;&gt;it_name;\r\n\r\ndel(it_name);\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to proceed.....\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nstorepageandswitch()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nint choice;\r\n\r\ncout&lt;&lt;\"\\n\\nROSE CANTEEN SERVICES\\n\";\r\n\r\ncout&lt;&lt;\"\\n Press 1 to Order Food\\nPress 2 to Search Item\\nPress 3 to Delete Item\\nPress 4 to Generate Bill\\nPress 5 to Exit\\n\";\r\n\r\ncout&lt;&lt;\"Enter your desired choice\\n\";\r\n\r\ncin&gt;&gt;choice;\r\n\r\nswitch(choice)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\norderfood();\r\n\r\nbreak;\r\n\r\nstorepageandswitch();\r\n\r\ncase 2:{\r\n\r\nfoodsearch();\r\n\r\nbreak;\r\n\r\n\r\n\r\n\r\n}\r\n\r\ncase 3:{\r\n\r\ndeletefood();\r\n\r\nbreak;\r\n\r\n}\r\n\r\ncase 4:{\r\n\r\nbill();\r\n\r\nbreak;\r\n\r\n}\r\n\r\ncase 5:{\r\n\r\ncout&lt;&lt;\"ROSE CANTEEN \\n\";\r\n\r\ncout&lt;&lt;\"Thank You!! Please visit again\\n\";\r\n\r\nbreak;\r\n\r\n}\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;\"Sorry !!!Invalid Choice\\n\";\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;choice;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\n};\r\n\r\nclass employee\r\n\r\n{\r\n\r\npublic:\r\n\r\nint ch,age;\r\n\r\nchar name[50];\r\n\r\nlong int sal;\r\n\r\nvoid addemp();\r\n\r\nvoid displayemp();\r\n\r\nvoid removeemp();\r\n\r\nvoid editemp();\r\n\r\nvoid emppageswitch();\r\n\r\nvoid emppage()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 1 to DISPLAY ALL THE DETAILS OF AN EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 2 to ADD DETAILS OF NEW EMPLOYEES \"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 3 to REMOVE THE DETAILS OF EMPLOYEES\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 4 to EXIT FROM THE SYSTEM\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR REQUIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nemppageswitch();\r\n\r\n}\r\n\r\n};\r\n\r\nvoid employee::emppageswitch()\r\n\r\n{\r\n\r\nwhile(ch!=1||ch!=2||ch!=3||ch!=4)\r\n\r\n{\r\n\r\nswitch(ch)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\ndisplayemp();\r\n\r\nbreak;\r\n\r\ncase 2:\r\n\r\naddemp();\r\n\r\nbreak;\r\n\r\ncase 3:\r\n\r\nremoveemp();\r\n\r\nbreak;\r\n\r\ncase 4:\r\n\r\nexit(0);\r\n\r\nbreak;\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!!INVALID CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR CHOICE AGAIN \"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid employee::addemp()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nofstream newemployee(\"EMPLOYEE.txt\",ios::app);\r\n\r\ncout&lt;&lt;\" PLEASE ENTER THE NAME OF EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;name;\r\n\r\ncin.sync();\r\n\r\ncout&lt;&lt;\" ENTER EMPLOYEE's AGE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;age;\r\n\r\ncout&lt;&lt;\" ENTER EMPLOYEE's SALARY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;sal;\r\n\r\nnewemployee&lt;&lt;name&lt;&lt;' '&lt;&lt;age&lt;&lt;' '&lt;&lt;sal&lt;&lt;endl;\r\n\r\nnewemployee.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" THE EMPLOYEE HAS BEEN ADDED SUCCESSFULLY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nemppage();\r\n\r\n}\r\n\r\nvoid employee::displayemp()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nifstream employee(\"EMPLOYEE.txt\");\r\n\r\ncout&lt;&lt;\" EMPLOYEE ---- AGE ---- SALARY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" -----------------------\"&lt;&lt;endl;\r\n\r\nwhile (employee&gt;&gt;name&gt;&gt;age&gt;&gt;sal)\r\n\r\n{\r\n\r\ncout&lt;&lt;\" \"&lt;&lt;name&lt;&lt;\" -- \"&lt;&lt;age&lt;&lt;\" -- \"&lt;&lt;sal&lt;&lt;endl ;\r\n\r\n}\r\n\r\nemployee.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nemppage();\r\n\r\n}\r\n\r\nvoid employee::removeemp()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nchar tname[50];\r\n\r\nifstream emp1(\"EMPLOYEE.txt\");\r\n\r\nofstream emp2(\"temp.txt\");\r\n\r\ncout&lt;&lt;\" ENTER THE EMPLOYEE's NAME THAT YOU WISH TO REMOVE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;tname;\r\n\r\nwhile(emp1&gt;&gt;name&gt;&gt;age&gt;&gt;sal)\r\n\r\n{\r\n\r\nif(strcmp(name,tname)!=0)\r\n\r\n{\r\n\r\nemp2&lt;&lt;name&lt;&lt;' '&lt;&lt;age&lt;&lt;' '&lt;&lt;sal&lt;&lt;endl;\r\n\r\n}\r\n\r\n}\r\n\r\nemp1.close();\r\n\r\nemp2.close();\r\n\r\nremove(\"EMPLOYEE.txt\");\r\n\r\nrename(\"temp.txt\",\"EMPLOYEE.txt\");\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" THE EMPLOYEE HAS BEEN REMOVED SUCCESSFULLY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";\r\n\r\ngetch();\r\n\r\nemppage();\r\n\r\n}\r\n\r\nclass login\r\n\r\n{\r\n\r\npublic:\r\n\r\nstring pass=\"\";\r\n\r\nint ch;\r\n\r\nchar c;\r\n\r\nvoid loginpageswitch();\r\n\r\nvoid homepageswitch();\r\n\r\nvoid employeelogin();\r\n\r\nvoid ownerlogin();\r\n\r\nvoid emp();\r\n\r\nvoid own();\r\n\r\nvoid homepage()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"WELCOME TO ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"----------------------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 1 to LOGIN into the system\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 2 to EXIT from the system\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nhomepageswitch();\r\n\r\n}\r\n\r\nvoid loginpage()\r\n\r\n{\r\n\r\nloginpage:;\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 1 to LOGIN as the OWNER\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 2 to LOGIN as the EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 3 to EXIT from the system\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nloginpageswitch();\r\n\r\n}\r\n\r\n};\r\n\r\nvoid login::homepageswitch()\r\n\r\n{\r\n\r\nwhile(ch!=1||ch!=2)\r\n\r\n{\r\n\r\nswitch(ch)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\nloginpage();\r\n\r\nbreak;\r\n\r\ncase 2:\r\n\r\nexit(0);\r\n\r\nbreak;\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!! INVALID CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::loginpageswitch()\r\n\r\n{\r\n\r\nwhile(ch!=1||ch!=2||ch!=3)\r\n\r\n{\r\n\r\nswitch(ch)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\nownerlogin();\r\n\r\nbreak;\r\n\r\ncase 2:\r\n\r\nemployeelogin();\r\n\r\nbreak;\r\n\r\ncase 3:\r\n\r\nexit(0);\r\n\r\nbreak;\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!! INVALID CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::ownerlogin()\r\n\r\n{\r\n\r\nwhile(pass!=\"OWN\")\r\n\r\n{\r\n\r\npass=\"\";\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" ENTER PASSWORD TO LOGIN AS OWNER\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";c=_getch();\r\n\r\nwhile(c!=13)\r\n\r\n{\r\n\r\npass.push_back(c);\r\n\r\ncout&lt;&lt;\"*\";\r\n\r\nc=getch();\r\n\r\n}\r\n\r\nif(pass==\"OWN\")\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" OWNER ACCESS IS GRANTED\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nown();\r\n\r\n}\r\n\r\nelse\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" THE ENTERED PASSWORD IS INVALID \"&lt;&lt;endl;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::employeelogin()\r\n\r\n{\r\n\r\nwhile(pass!=\"EMP\")\r\n\r\n{\r\n\r\npass=\"\";\r\n\r\ncout&lt;&lt;\" ENTER PASSWORD TO LOGIN AS EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";c=_getch();\r\n\r\nwhile(c!=13)\r\n\r\n{\r\n\r\npass.push_back(c);\r\n\r\ncout&lt;&lt;\"*\";\r\n\r\nc=getch();\r\n\r\n}\r\n\r\nif(pass==\"EMP\")\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" EMPLOYEE ACCESS IS GRANTED\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nemp();\r\n\r\n}\r\n\r\nelse\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!!! INVALID PASSWORD\"&lt;&lt;endl;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::emp()\r\n\r\n{\r\n\r\nstore_manage s;\r\n\r\ns.store_var_page();\r\n\r\n}\r\n\r\nvoid login::own()\r\n\r\n{\r\n\r\nemployee e;\r\n\r\ne.emppage();\r\n\r\n}\r\n\r\nvoid empjump()\r\n\r\n{\r\n\r\nemployee e;\r\n\r\ne.emppage();\r\n\r\n}\r\n\r\nint main()\r\n\r\n{\r\n\r\nsystem(\"-------- CANTEEN MANAGEMENT SYSTEM--------\");\r\n\r\nsystem(\"color 75\");\r\n\r\nlogin l;\r\n\r\nl.homepage();\r\n\r\nreturn 0;\r\n\r\n}\r\n\r\n#include&lt;stdio.h&gt;\r\n\r\n#include&lt;cstdlib&gt;\r\n\r\n#include&lt;string&gt;\r\n\r\n#include&lt;conio.h&gt;\r\n\r\nusing namespace std;\r\n\r\nCOORD coordinate={0,0};\r\n\r\nvoid gotoxy(int x,int y)\r\n\r\n{\r\n\r\ncoordinate.X=x;\r\n\r\ncoordinate.Y=y;\r\n\r\nSetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coordinate);\r\n\r\n}\r\n\r\nclass store_manage\r\n\r\n{\r\n\r\npublic:\r\n\r\n\r\n\r\n\r\nvoid store_var_page()\r\n\r\n{\r\n\r\nstorepageandswitch();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nint canteen_flag=0,number=0;\r\n\r\nchar canteen_index[5];\r\n\r\nstruct canteenmanage{\r\n\r\nchar ind[5],\r\n\r\nitem_id[5],\r\n\r\nitem_name[20],\r\n\r\ncost[20],\r\n\r\nquantity[20],\r\n\r\nrating[5];\r\n\r\n}can[20];\r\n\r\nstruct secind{\r\n\r\nchar item_name[20],\r\n\r\nitem_id[5],\r\n\r\nind[5];\r\n\r\n}sec[20],found[20];\r\n\r\nstruct index{\r\n\r\nchar item_id[20],ind[20];\r\n\r\n}in[20],temp;\r\n\r\nvoid sort_index()\r\n\r\n{\r\n\r\nint i,j;\r\n\r\nfor(i=0;i&lt;number-1;i++)\r\n\r\nfor(j=0;j&lt;number-i-1;j++)\r\n\r\nif(strcmp(in[j].item_id,in[j+1].item_id)&gt;0)\r\n\r\n{\r\n\r\ntemp =in[j];\r\n\r\nin[j]=in[j+1];\r\n\r\nin[j+1]=temp;\r\n\r\n}\r\n\r\n}\r\n\r\nvoid sort_secind()\r\n\r\n{\r\n\r\nint i,j;\r\n\r\nsecind temp;\r\n\r\nfor(i=0;i&lt;number-1;i++)\r\n\r\nfor(j=0;j&lt;number-i-1;j++)\r\n\r\nif(strcmp(sec[j].item_name,sec[j+1].item_name)&gt;0)\r\n\r\n{\r\n\r\ntemp =sec[j];\r\n\r\nsec[j]=sec[j+1];\r\n\r\nsec[j+1]=temp;\r\n\r\n}\r\n\r\nelse if(strcmp(sec[j].item_name,sec[j+1].item_name)==0)\r\n\r\n{\r\n\r\nif(strcmp(sec[j].item_id,sec[j+1].item_id)&gt;0)\r\n\r\n{\r\n\r\ntemp =sec[j];\r\n\r\nsec[j]=sec[j+1];\r\n\r\nsec[j+1]=temp;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid ret_rec(char *ind)\r\n\r\n{\r\n\r\nint flag=0;\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(can[i].ind,ind)==0)\r\n\r\n{\r\n\r\nstrcpy(canteen_index,ind);\r\n\r\ncanteen_flag=1;\r\n\r\ncout&lt;&lt;\"Your Item is found\\n\";\r\n\r\ncout&lt;&lt;can[i].item_id&lt;&lt;\"|\"&lt;&lt;can[i].item_name&lt;&lt;\"|\"&lt;&lt;can[i].cost&lt;&lt;\"|\"&lt;&lt;can[i].quantity&lt;&lt;\"|\"&lt;&lt;can[i].rating&lt;&lt;\"\\n\";\r\n\r\nflag=1;\r\n\r\n}\r\n\r\n}\r\n\r\nif(!flag)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"sorry the Item search has been failed\\n\";\r\n\r\n}\r\n\r\n}\r\n\r\nvoid search_index(char *item_id)\r\n\r\n{\r\n\r\nint flag=0;\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(in[i].item_id,item_id)==0)\r\n\r\n{\r\n\r\nret_rec(in[i].ind);\r\n\r\nflag=1;\r\n\r\n}\r\n\r\n}\r\n\r\nif(!flag)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"sorry Index search has been failed\\n\";\r\n\r\n}\r\n\r\n}\r\n\r\nvoid search(char *it_name)\r\n\r\n{\r\n\r\nchar it_id[20];\r\n\r\nint flag1=0;\r\n\r\nint k=0,i;\r\n\r\nfor(i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(sec[i].item_name,it_name)==0)\r\n\r\n{\r\n\r\nstrcpy(found[k].item_id,sec[i].item_id);\r\n\r\nstrcpy(found[k].item_name,sec[i].item_name);\r\n\r\nstrcpy(found[k].ind,sec[i].ind);\r\n\r\nflag1=1;\r\n\r\nk++;\r\n\r\n}\r\n\r\n}\r\n\r\nif(!flag1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"second index search has been failed\\n\";\r\n\r\nreturn;\r\n\r\n}\r\n\r\ncout&lt;&lt;\"\\n The records which are matched are:\";\r\n\r\nfor(i=0;i&lt;k;i++)\r\n\r\ncout&lt;&lt;\"\\n\"&lt;&lt;found[i].item_name&lt;&lt;\" \"&lt;&lt;found[i].item_id;\r\n\r\ncout&lt;&lt;\"\\n Please select an Item ID \";\r\n\r\ncin&gt;&gt;it_id;\r\n\r\nflag1=0;\r\n\r\nfor(i=0;i&lt;k;i++)\r\n\r\nif(strcmp(found[i].item_id,it_id)==0)\r\n\r\n{\r\n\r\nsearch_index(it_id);\r\n\r\nflag1=1;\r\n\r\n}\r\n\r\nif(!flag1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"Wrong item ID entered search has been failed\\n\";\r\n\r\n}\r\n\r\n}\r\n\r\nint search_item(char *it_id,int j)\r\n\r\n{\r\n\r\nint flag=0;\r\n\r\nfor(int i=0;i&lt;j;i++)\r\n\r\n{\r\n\r\nif(strcmp(can[i].item_id,it_id)==0)\r\n\r\n{\r\n\r\nflag=1;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\nif(flag)\r\n\r\nreturn 1;\r\n\r\nelse\r\n\r\nreturn -1;\r\n\r\n}\r\n\r\nvoid del(char *it_name)\r\n\r\n{\r\n\r\ncanteen_flag=0;\r\n\r\nint fr=0;\r\n\r\nsearch(it_name);\r\n\r\nif(!canteen_flag)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"Sorry Deletion has failed\\n\";\r\n\r\nreturn;\r\n\r\n}\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nif(strcmp(can[i].ind,canteen_index)==0)\r\n\r\n{\r\n\r\nfr=i;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\nfor(int i=fr;i&lt;number-1;i++)\r\n\r\n{\r\n\r\ncan[i]=can[i+1];\r\n\r\nchar str[3];\r\n\r\nsprintf(str,\"%d\",i);\r\n\r\nstrcpy(can[i].ind,str);\r\n\r\n}\r\n\r\nnumber--;\r\n\r\n\r\n\r\n\r\nfstream f1,f2,f3;\r\n\r\nf1.open(\"canteen1.txt\",ios::out);\r\n\r\nf2.open(\"index.txt\",ios::out);\r\n\r\nf3.open(\"secind.txt\",ios::out);\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nstrcpy(sec[i].item_name,can[i].item_name);\r\n\r\nstrcpy(sec[i].item_id,can[i].item_id);\r\n\r\nstrcpy(in[i].item_id,can[i].item_id);\r\n\r\nstrcpy(sec[i].ind,can[i].ind);\r\n\r\nstrcpy(in[i].ind,can[i].ind);\r\n\r\n}\r\n\r\nsort_index();\r\n\r\nsort_secind();\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nf1&lt;&lt;can[i].ind&lt;&lt;\"|\"&lt;&lt;can[i].item_id&lt;&lt;\"|\"&lt;&lt;can[i].item_name&lt;&lt;\"|\"&lt;&lt;can[i].cost&lt;&lt;\"|\"&lt;&lt;can[i].quantity&lt;&lt;\"|\"&lt;&lt;can[i].rating&lt;&lt;\"\\n\";\r\n\r\nf2&lt;&lt;in[i].item_id&lt;&lt;\"|\"&lt;&lt;in[i].ind&lt;&lt;\"\\n\";\r\n\r\nf3&lt;&lt;sec[i].item_name&lt;&lt;\"|\"&lt;&lt;sec[i].item_id&lt;&lt;\"|\"&lt;&lt;sec[i].ind&lt;&lt;\"\\n\";\r\n\r\n}\r\n\r\nf1.close();\r\n\r\nf2.close();\r\n\r\nf3.close();\r\n\r\ncout&lt;&lt;\"your deletion has been successful\";\r\n\r\n}\r\n\r\n\r\n\r\n\r\nvoid orderfood()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"\\nROSE CANTEEN\";\r\n\r\ngotoxy(40,2);\r\n\r\nint choice,i,flag1,flag;\r\n\r\nfstream file1,file2,file3;\r\n\r\nchar ind[5],\r\n\r\nit_id[20],\r\n\r\nit_name[20],\r\n\r\nitem_id[5],\r\n\r\nitem_name[20],\r\n\r\ncost[20],\r\n\r\nquantity[20],\r\n\r\nrating[5];\r\n\r\nfile3.open(\"index.txt\",ios::out);\r\n\r\nfile1.open(\"canteen1.txt\",ios::app|ios::out);\r\n\r\nfile2.open(\"secind.txt\",ios::out);\r\n\r\nif(!file1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"Sorry your file could not be added\";\r\n\r\nexit(0);\r\n\r\n}\r\n\r\nint n;\r\n\r\ncout&lt;&lt;\"\\nEnter the total number of food items\\n\";\r\n\r\ncin&gt;&gt;n;\r\n\r\nfor(int i=number;i&lt;number+n;i++)\r\n\r\n{\r\n\r\nlabel: cout&lt;&lt;\"\\n Please Enter \"&lt;&lt;i+1&lt;&lt;\" the name of the item:\\n\";\r\n\r\ncout&lt;&lt;\"Please Enter the Item's id:\"; cin&gt;&gt;can[i].item_id;\r\n\r\ncout&lt;&lt;\"Please Enter the name of the Item:\"; cin&gt;&gt;can[i].item_name;\r\n\r\ncout&lt;&lt;\"Please Enter Cost of the item :\"; cin&gt;&gt;can[i].cost;\r\n\r\ncout&lt;&lt;\"Please Enter Quantity of item:\"; cin&gt;&gt;can[i].quantity;\r\n\r\ncout&lt;&lt;\"Please Enter rating of the item:\"; cin&gt;&gt;can[i].rating;\r\n\r\nint q=search_item(can[i].item_id,i);\r\n\r\nif(q==1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"This is a duplicate entry,Please Enter again\\n\";\r\n\r\ngoto label;\r\n\r\n}\r\n\r\nfile1&lt;&lt;i&lt;&lt;\"|\"&lt;&lt;can[i].item_id&lt;&lt;\"|\"&lt;&lt;can[i].item_name&lt;&lt;\"|\"&lt;&lt;can[i].cost&lt;&lt;\"|\"&lt;&lt;can[i].quantity&lt;&lt;\"|\"&lt;&lt;can[i].rating&lt;&lt;\"\\n\";\r\n\r\n}\r\n\r\nfile1.close();\r\n\r\nnumber=number+n;\r\n\r\nfile1.open(\"canteen1.txt\",ios::in);\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\n{\r\n\r\nfile1.getline(ind,5,'|');\r\n\r\nfile1.getline(item_id,5,'|');\r\n\r\nfile1.getline(item_name,20,'|');\r\n\r\nfile1.getline(cost,20,'|');\r\n\r\nfile1.getline(quantity,20,'|');\r\n\r\nfile1.getline(rating,5,'\\n');\r\n\r\nstrcpy(can[i].ind,ind);\r\n\r\nstrcpy(sec[i].ind,ind);\r\n\r\nstrcpy(in[i].ind,ind);\r\n\r\nstrcpy(sec[i].item_name,item_name);\r\n\r\nstrcpy(sec[i].item_id,item_id);\r\n\r\nstrcpy(in[i].item_id,item_id);\r\n\r\n}\r\n\r\nsort_index();\r\n\r\nsort_secind();\r\n\r\ncout&lt;&lt;\"\\n Secondary index has been sorted the components are:\\n\";\r\n\r\nfor(i=0;i&lt;number;i++)\r\n\r\ncout&lt;&lt;sec[i].item_name&lt;&lt;\" \"&lt;&lt;sec[i].item_id&lt;&lt;\" \"&lt;&lt;sec[i].ind&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\"\\nThe index has been sorted its components are:\\n\";\r\n\r\nfor(i=0;i&lt;number;i++)\r\n\r\ncout&lt;&lt;in[i].item_id&lt;&lt;\" \"&lt;&lt;in[i].ind&lt;&lt;endl;\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\nfile2&lt;&lt;sec[i].item_name&lt;&lt;\"|\"&lt;&lt;sec[i].item_id&lt;&lt;\"|\"&lt;&lt;sec[i].ind&lt;&lt;\"\\n\";\r\n\r\nfor(int i=0;i&lt;number;i++)\r\n\r\nfile3&lt;&lt;in[i].item_id&lt;&lt;\"|\"&lt;&lt;in[i].ind&lt;&lt;\"\\n\";\r\n\r\n\r\n\r\n\r\nfile1.close();\r\n\r\nfile2.close();\r\n\r\nfile3.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to procced in the system\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nvoid bill()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);\r\n\r\nint choice,i,flag1,flag;\r\n\r\nfstream file1,file2,file3;\r\n\r\nchar ind[5],\r\n\r\nit_id[20],\r\n\r\nit_name[20],\r\n\r\nitem_id[5],\r\n\r\nitem_name[20],\r\n\r\ncost[20],\r\n\r\nquantity[20],\r\n\r\nrating[5];\r\n\r\nfstream f1;\r\n\r\nf1.open(\"canteen1.txt\",ios::in);\r\n\r\nif(!f1)\r\n\r\n{\r\n\r\ncout&lt;&lt;\"File not found\";\r\n\r\nexit(0);\r\n\r\n}\r\n\r\ncout&lt;&lt;\"\\nID NAME COST QUANTITY RATINGS\\t\\n\\n\";\r\n\r\ni=0;\r\n\r\nwhile(i!=number)\r\n\r\n{\r\n\r\nf1.getline(ind,5,'|');\r\n\r\nf1.getline(item_id,5,'|');\r\n\r\nf1.getline(item_name,20,'|');\r\n\r\nf1.getline(cost,20,'|');\r\n\r\nf1.getline(quantity,20,'|');\r\n\r\nf1.getline(rating,5,'\\n');\r\n\r\ncout&lt;&lt;\"\\n\"&lt;&lt;item_id&lt;&lt;\"\\t\"&lt;&lt;item_name&lt;&lt;\"\\t\\t\"&lt;&lt;cost&lt;&lt;\"\\t\"&lt;&lt;quantity&lt;&lt;\"\\t\"&lt;&lt;rating&lt;&lt;\"\\t\\n\";\r\n\r\ni++;\r\n\r\n}\r\n\r\nint totalcost=0;\r\n\r\ncout&lt;&lt;\"\\nThe total number of food items that have been ordered are :\"&lt;&lt;i&lt;&lt;\"\\n\";\r\n\r\nfor(int f=i-1;f&lt;0;f--)\r\n\r\n{\r\n\r\ntotalcost=totalcost+ (cost[f]*quantity[f]);\r\n\r\ncout&lt;&lt;totalcost;\r\n\r\n}\r\n\r\ncout&lt;&lt;\"\\nPlease make a payment of Rs.70\"&lt;&lt;totalcost&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" THANK YOU \\n\";\r\n\r\n\r\n\r\n\r\nf1.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to proceed.....\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nvoid foodsearch()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\\n\";\r\n\r\ngotoxy(40,2);\r\n\r\nchar it_name[20];\r\n\r\ncout&lt;&lt;\"\\nEnter Item name to be searched\\n\";\r\n\r\ncin&gt;&gt;it_name;\r\n\r\nsearch(it_name);\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to proceed.....\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\nvoid deletefood()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);\r\n\r\nchar it_name[20];\r\n\r\ncout&lt;&lt;\"\\nEnter the Item name to be deleted\\n\";\r\n\r\ncin&gt;&gt;it_name;\r\n\r\ndel(it_name);\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Enter any key to proceed.....\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nstore_var_page();\r\n\r\n}\r\n\r\n\r\n\r\n\r\nstorepageandswitch()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nint choice;\r\n\r\ncout&lt;&lt;\"\\n\\nROSE CANTEEN SERVICES\\n\";\r\n\r\ncout&lt;&lt;\"\\n Press 1 to Order Food\\nPress 2 to Search Item\\nPress 3 to Delete Item\\nPress 4 to Generate Bill\\nPress 5 to Exit\\n\";\r\n\r\ncout&lt;&lt;\"Enter your desired choice\\n\";\r\n\r\ncin&gt;&gt;choice;\r\n\r\nswitch(choice)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\norderfood();\r\n\r\nbreak;\r\n\r\nstorepageandswitch();\r\n\r\ncase 2:{\r\n\r\nfoodsearch();\r\n\r\nbreak;\r\n\r\n\r\n\r\n\r\n}\r\n\r\ncase 3:{\r\n\r\ndeletefood();\r\n\r\nbreak;\r\n\r\n}\r\n\r\ncase 4:{\r\n\r\nbill();\r\n\r\nbreak;\r\n\r\n}\r\n\r\ncase 5:{\r\n\r\ncout&lt;&lt;\"ROSE CANTEEN \\n\";\r\n\r\ncout&lt;&lt;\"Thank You!! Please visit again\\n\";\r\n\r\nbreak;\r\n\r\n}\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;\"Sorry !!!Invalid Choice\\n\";\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;choice;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\n};\r\n\r\nclass employee\r\n\r\n{\r\n\r\npublic:\r\n\r\nint ch,age;\r\n\r\nchar name[50];\r\n\r\nlong int sal;\r\n\r\nvoid addemp();\r\n\r\nvoid displayemp();\r\n\r\nvoid removeemp();\r\n\r\nvoid editemp();\r\n\r\nvoid emppageswitch();\r\n\r\nvoid emppage()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 1 to DISPLAY ALL THE DETAILS OF AN EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 2 to ADD DETAILS OF NEW EMPLOYEES \"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 3 to REMOVE THE DETAILS OF EMPLOYEES\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press 4 to EXIT FROM THE SYSTEM\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR REQUIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nemppageswitch();\r\n\r\n}\r\n\r\n};\r\n\r\nvoid employee::emppageswitch()\r\n\r\n{\r\n\r\nwhile(ch!=1||ch!=2||ch!=3||ch!=4)\r\n\r\n{\r\n\r\nswitch(ch)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\ndisplayemp();\r\n\r\nbreak;\r\n\r\ncase 2:\r\n\r\naddemp();\r\n\r\nbreak;\r\n\r\ncase 3:\r\n\r\nremoveemp();\r\n\r\nbreak;\r\n\r\ncase 4:\r\n\r\nexit(0);\r\n\r\nbreak;\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!!INVALID CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR CHOICE AGAIN \"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid employee::addemp()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nofstream newemployee(\"EMPLOYEE.txt\",ios::app);\r\n\r\ncout&lt;&lt;\" PLEASE ENTER THE NAME OF EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;name;\r\n\r\ncin.sync();\r\n\r\ncout&lt;&lt;\" ENTER EMPLOYEE's AGE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;age;\r\n\r\ncout&lt;&lt;\" ENTER EMPLOYEE's SALARY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;sal;\r\n\r\nnewemployee&lt;&lt;name&lt;&lt;' '&lt;&lt;age&lt;&lt;' '&lt;&lt;sal&lt;&lt;endl;\r\n\r\nnewemployee.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" THE EMPLOYEE HAS BEEN ADDED SUCCESSFULLY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\";\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nemppage();\r\n\r\n}\r\n\r\nvoid employee::displayemp()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nifstream employee(\"EMPLOYEE.txt\");\r\n\r\ncout&lt;&lt;\" EMPLOYEE ---- AGE ---- SALARY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" -----------------------\"&lt;&lt;endl;\r\n\r\nwhile (employee&gt;&gt;name&gt;&gt;age&gt;&gt;sal)\r\n\r\n{\r\n\r\ncout&lt;&lt;\" \"&lt;&lt;name&lt;&lt;\" -- \"&lt;&lt;age&lt;&lt;\" -- \"&lt;&lt;sal&lt;&lt;endl ;\r\n\r\n}\r\n\r\nemployee.close();\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nemppage();\r\n\r\n}\r\n\r\nvoid employee::removeemp()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nchar tname[50];\r\n\r\nifstream emp1(\"EMPLOYEE.txt\");\r\n\r\nofstream emp2(\"temp.txt\");\r\n\r\ncout&lt;&lt;\" ENTER THE EMPLOYEE's NAME THAT YOU WISH TO REMOVE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;tname;\r\n\r\nwhile(emp1&gt;&gt;name&gt;&gt;age&gt;&gt;sal)\r\n\r\n{\r\n\r\nif(strcmp(name,tname)!=0)\r\n\r\n{\r\n\r\nemp2&lt;&lt;name&lt;&lt;' '&lt;&lt;age&lt;&lt;' '&lt;&lt;sal&lt;&lt;endl;\r\n\r\n}\r\n\r\n}\r\n\r\nemp1.close();\r\n\r\nemp2.close();\r\n\r\nremove(\"EMPLOYEE.txt\");\r\n\r\nrename(\"temp.txt\",\"EMPLOYEE.txt\");\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" THE EMPLOYEE HAS BEEN REMOVED SUCCESSFULLY\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";\r\n\r\ngetch();\r\n\r\nemppage();\r\n\r\n}\r\n\r\nclass login\r\n\r\n{\r\n\r\npublic:\r\n\r\nstring pass=\"\";\r\n\r\nint ch;\r\n\r\nchar c;\r\n\r\nvoid loginpageswitch();\r\n\r\nvoid homepageswitch();\r\n\r\nvoid employeelogin();\r\n\r\nvoid ownerlogin();\r\n\r\nvoid emp();\r\n\r\nvoid own();\r\n\r\nvoid homepage()\r\n\r\n{\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"WELCOME TO ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"----------------------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 1 to LOGIN into the system\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 2 to EXIT from the system\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nhomepageswitch();\r\n\r\n}\r\n\r\nvoid loginpage()\r\n\r\n{\r\n\r\nloginpage:;\r\n\r\nsystem(\"CLS\");\r\n\r\ngotoxy(40,1);cout&lt;&lt;\"ROSE CANTEEN\";\r\n\r\ngotoxy(40,2);cout&lt;&lt;\"-----------------\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 1 to LOGIN as the OWNER\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 2 to LOGIN as the EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" PRESS 3 to EXIT from the system\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\nloginpageswitch();\r\n\r\n}\r\n\r\n};\r\n\r\nvoid login::homepageswitch()\r\n\r\n{\r\n\r\nwhile(ch!=1||ch!=2)\r\n\r\n{\r\n\r\nswitch(ch)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\nloginpage();\r\n\r\nbreak;\r\n\r\ncase 2:\r\n\r\nexit(0);\r\n\r\nbreak;\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!! INVALID CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::loginpageswitch()\r\n\r\n{\r\n\r\nwhile(ch!=1||ch!=2||ch!=3)\r\n\r\n{\r\n\r\nswitch(ch)\r\n\r\n{\r\n\r\ncase 1:\r\n\r\nownerlogin();\r\n\r\nbreak;\r\n\r\ncase 2:\r\n\r\nemployeelogin();\r\n\r\nbreak;\r\n\r\ncase 3:\r\n\r\nexit(0);\r\n\r\nbreak;\r\n\r\ndefault:\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!! INVALID CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" ENTER YOUR DESIRED CHOICE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";cin&gt;&gt;ch;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::ownerlogin()\r\n\r\n{\r\n\r\nwhile(pass!=\"OWN\")\r\n\r\n{\r\n\r\npass=\"\";\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" ENTER PASSWORD TO LOGIN AS OWNER\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";c=_getch();\r\n\r\nwhile(c!=13)\r\n\r\n{\r\n\r\npass.push_back(c);\r\n\r\ncout&lt;&lt;\"*\";\r\n\r\nc=getch();\r\n\r\n}\r\n\r\nif(pass==\"OWN\")\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" OWNER ACCESS IS GRANTED\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nown();\r\n\r\n}\r\n\r\nelse\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" THE ENTERED PASSWORD IS INVALID \"&lt;&lt;endl;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::employeelogin()\r\n\r\n{\r\n\r\nwhile(pass!=\"EMP\")\r\n\r\n{\r\n\r\npass=\"\";\r\n\r\ncout&lt;&lt;\" ENTER PASSWORD TO LOGIN AS EMPLOYEE\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";c=_getch();\r\n\r\nwhile(c!=13)\r\n\r\n{\r\n\r\npass.push_back(c);\r\n\r\ncout&lt;&lt;\"*\";\r\n\r\nc=getch();\r\n\r\n}\r\n\r\nif(pass==\"EMP\")\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" EMPLOYEE ACCESS IS GRANTED\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" Press any other key to continue......\"&lt;&lt;endl;\r\n\r\ncout&lt;&lt;\" \";getch();\r\n\r\nemp();\r\n\r\n}\r\n\r\nelse\r\n\r\n{\r\n\r\ncout&lt;&lt;endl&lt;&lt;\" SORRY!!! INVALID PASSWORD\"&lt;&lt;endl;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nvoid login::emp()\r\n\r\n{\r\n\r\nstore_manage s;\r\n\r\ns.store_var_page();\r\n\r\n}\r\n\r\nvoid login::own()\r\n\r\n{\r\n\r\nemployee e;\r\n\r\ne.emppage();\r\n\r\n}\r\n\r\nvoid empjump()\r\n\r\n{\r\n\r\nemployee e;\r\n\r\ne.emppage();\r\n\r\n}\r\n\r\nint main()\r\n\r\n{\r\n\r\nsystem(\"-------- CANTEEN MANAGEMENT SYSTEM--------\");\r\n\r\nsystem(\"color 75\");\r\n\r\nlogin l;\r\n\r\nl.homepage();\r\n\r\nreturn 0;\r\n\r\n}<\/pre>\n<h2><strong>Explanation of the Code:<\/strong><\/h2>\n<p><span data-preserver-spaces=\"true\">Let&#8217;s go through the code step by step and explain what each function is doing:<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>1. gotoxy(int x, int y):<\/strong> This function is used to move the cursor to the specified position (x, y) on the console screen. It is used to create a basic text-based user interface by positioning the output at specific coordinates.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>2. class store_manage:<\/strong> This is a class that contains functions related to managing the canteen&#8217;s inventory. It has functions for ordering food, searching for food items, deleting food items, generating a bill, and displaying the canteen&#8217;s inventory.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>3. class employee:<\/strong> This is another class that contains functions related to managing employees. It has functions for adding new employees, displaying employee details, and removing employees.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>4. void login::own():<\/strong> This function is a part of the login class and is used to provide access to the owner of the canteen. It asks the user to enter a password, and if the correct password is entered (in this case, &#8220;OWN&#8221;), the owner can access the employee management functionalities.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>5. void login::emp():<\/strong> This function is a part of the login class and is used to provide access to the employees of the canteen. It asks the user to enter a password, and if the correct password is entered (in this case, &#8220;EMP&#8221;), the employees can access the canteen inventory management functionalities.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>6. void login::homepageswitch():<\/strong> This function is a part of the login class and is used to navigate between different options on the homepage. It allows the user to either log in as an owner or an employee or exit the system.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>7. void login::loginpageswitch():<\/strong> This function is a part of the login class and is used to navigate between different options on the login page. It allows the user to choose whether they want to log in as an owner or employee or exit the system.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>8. void store_manage::store_var_page():<\/strong> This function is used to display the main menu of the canteen&#8217;s inventory management system. It provides options to order food, search for food items, delete food items, generate a bill, and exit the system.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>9. void store_manage::orderfood():<\/strong> This function is used to add new food items to the canteen&#8217;s inventory. It asks the user to enter details for the new food items, such as item name, item ID, cost, quantity, and rating. It also checks for duplicate entries and sorts the inventory for efficient searching.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>10. void store_manage::search():<\/strong> This function is used to search for food items in the canteen&#8217;s inventory based on the item name. It displays a list of matched items and allows the user to select a specific item ID to view its details.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>11. void store_manage::del():<\/strong> This function is used to delete a food item from the canteen&#8217;s inventory. It searches for the item to be deleted, updates the inventory, and rewrites the updated data to the storage files.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>12. void store_manage::bill():<\/strong> This function is used to generate a bill for the ordered food items. It calculates the total cost and displays the bill along with a thank you message.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>13. void employee::emppage():<\/strong> This function is used to display the main menu for employee management. It allows the user to view all employee details, add new employees, remove employees, or exit the employee management system.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>14. void employee::addemp():<\/strong> This function is used to add a new employee to the employee records. It prompts the user to enter the employee&#8217;s name, age, and salary and stores the details in a file.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>15. void employee::displayemp():<\/strong> This function is used to display all the details of all employees stored in the file.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"><strong>16. void employee::removeemp():<\/strong> This function is used to remove an employee from the employee records. It prompts the user to enter the name of the employee to be removed, and then it updates the records by removing the specified employee.<\/span><\/p>\n<h2><a id=\"post-14828-_kb7k3ympbiii\"><\/a><strong>Output<\/strong><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-17504 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2023\/07\/word-image-14828-1.webp\" alt=\"Canteen Management System with C++\" width=\"665\" height=\"381\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-17505 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2023\/07\/word-image-14828-3.webp\" alt=\"Canteen Management System with C++\" width=\"548\" height=\"240\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-17506 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2023\/07\/word-image-14828-4-e1690102241415.png\" alt=\"Canteen Management System with C++\" width=\"550\" height=\"394\" \/><\/p>\n<h2><a id=\"post-14828-_z49opp9nbk10\"><\/a><strong>Conclusion<\/strong><\/h2>\n<p>The above-written code for the Canteen Management System with C++ is a complete source file to perform basic operations for the admin and users. It provides the owner, user, and customer login operations so as to give the users a perfect platform.<\/p>\n<p>Through this management system, we can access the food item information and order the items that we intend to have in a straightforward, automated, and convenient manner<\/p>\n<p><a href=\"https:\/\/rudelabs.ai\/blogs\/category\/c-computer-science\/\"><strong>More C++ Projects&gt;&gt;&gt;<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Canteen management system streamlines tasks like menu planning, inventory control, and sales tracking, making canteen operations smoother and more organized.\u00a0<\/p>\n","protected":false},"author":1,"featured_media":14829,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[16,4,7],"tags":[],"class_list":["post-14828","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-computer-science","category-coding-basics","category-coding-projects"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Canteen Management System with C++ - RUDE LABS<\/title>\n<meta name=\"description\" content=\"In today&#039;s busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Canteen Management System with C++ - RUDE LABS\" \/>\n<meta property=\"og:description\" content=\"In today&#039;s busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\" \/>\n<meta property=\"og:site_name\" content=\"RUDE LABS\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-23T09:09:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-10T11:43:59+00:00\" \/>\n<meta name=\"author\" content=\"rudelabs.ai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rudelabs_in\" \/>\n<meta name=\"twitter:site\" content=\"@rudelabs_in\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rudelabs.ai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\"},\"author\":{\"name\":\"rudelabs.ai\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894\"},\"headline\":\"Canteen Management System with C++\",\"datePublished\":\"2023-07-23T09:09:50+00:00\",\"dateModified\":\"2025-10-10T11:43:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\"},\"wordCount\":971,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"C\/C++\",\"Coding Basics\",\"Coding Projects\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\",\"name\":\"Canteen Management System with C++ - RUDE LABS\",\"isPartOf\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2023-07-23T09:09:50+00:00\",\"dateModified\":\"2025-10-10T11:43:59+00:00\",\"description\":\"In today's busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution.\",\"breadcrumb\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rudelabs.ai\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Canteen Management System with C++\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#website\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/\",\"name\":\"RUDE LABS\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rudelabs.ai\/blogs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\",\"name\":\"RUDE LABS\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp\",\"contentUrl\":\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp\",\"width\":2459,\"height\":414,\"caption\":\"RUDE LABS\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/rudelabs_in\",\"https:\/\/www.linkedin.com\/company\/ru-delabs\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894\",\"name\":\"rudelabs.ai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g\",\"caption\":\"rudelabs.ai\"},\"sameAs\":[\"https:\/\/rudelabs.ai\/blogs\"],\"url\":\"https:\/\/rudelabs.ai\/blogs\/author\/rudelabs-ai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Canteen Management System with C++ - RUDE LABS","description":"In today's busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/","og_locale":"en_US","og_type":"article","og_title":"Canteen Management System with C++ - RUDE LABS","og_description":"In today's busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution.","og_url":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/","og_site_name":"RUDE LABS","article_published_time":"2023-07-23T09:09:50+00:00","article_modified_time":"2025-10-10T11:43:59+00:00","author":"rudelabs.ai","twitter_card":"summary_large_image","twitter_creator":"@rudelabs_in","twitter_site":"@rudelabs_in","twitter_misc":{"Written by":"rudelabs.ai","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#article","isPartOf":{"@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/"},"author":{"name":"rudelabs.ai","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894"},"headline":"Canteen Management System with C++","datePublished":"2023-07-23T09:09:50+00:00","dateModified":"2025-10-10T11:43:59+00:00","mainEntityOfPage":{"@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/"},"wordCount":971,"commentCount":0,"publisher":{"@id":"https:\/\/rudelabs.ai\/blogs\/#organization"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage"},"thumbnailUrl":"","articleSection":["C\/C++","Coding Basics","Coding Projects"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/","url":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/","name":"Canteen Management System with C++ - RUDE LABS","isPartOf":{"@id":"https:\/\/rudelabs.ai\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage"},"thumbnailUrl":"","datePublished":"2023-07-23T09:09:50+00:00","dateModified":"2025-10-10T11:43:59+00:00","description":"In today's busy world, managing canteens efficiently has become essential for schools, colleges, offices, and factories. To simplify and optimize this process, a Canteen Management System with C++ provides a practical solution.","breadcrumb":{"@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/rudelabs.ai\/blogs\/canteen-management-system-with-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rudelabs.ai\/blogs\/"},{"@type":"ListItem","position":2,"name":"Canteen Management System with C++"}]},{"@type":"WebSite","@id":"https:\/\/rudelabs.ai\/blogs\/#website","url":"https:\/\/rudelabs.ai\/blogs\/","name":"RUDE LABS","description":"","publisher":{"@id":"https:\/\/rudelabs.ai\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rudelabs.ai\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rudelabs.ai\/blogs\/#organization","name":"RUDE LABS","url":"https:\/\/rudelabs.ai\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp","contentUrl":"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp","width":2459,"height":414,"caption":"RUDE LABS"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/rudelabs_in","https:\/\/www.linkedin.com\/company\/ru-delabs\/"]},{"@type":"Person","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894","name":"rudelabs.ai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g","caption":"rudelabs.ai"},"sameAs":["https:\/\/rudelabs.ai\/blogs"],"url":"https:\/\/rudelabs.ai\/blogs\/author\/rudelabs-ai\/"}]}},"_links":{"self":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/14828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/comments?post=14828"}],"version-history":[{"count":2,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/14828\/revisions"}],"predecessor-version":[{"id":17631,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/14828\/revisions\/17631"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/media?parent=14828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/categories?post=14828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/tags?post=14828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}