You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i create an object of Person for working with input data
first we most initial an object from ifstream and ofstream on the fstream Library
give person.name & person.family from client and make those ::tolower
put name and family together and make new string fullName
maybe you question why we do that??
for better query on database Train.txt
cause data save like this:
sara, irani, 9, 6
ehsan , reziea, 10, 1
when we gonna know about this name is record on database or not
we must use this format <person.name>, <person.family> for search
then pass fullName to bool HaveTicket(string searchContent) function
that a bool function, so, return true false value
if data base have same name and family call another method whose name void ShowTicket(string personFullName)
Input 1. Reserve a Seat
RailwayCli/main.cpp
Lines 301 to 305 in 021ebb1
so, we need to reserve a new seat between 10 compartments & 6 Seats on every of them
RailwayCli/main.cpp
Lines 140 to 181 in 021ebb1
i create an object of
Person
for working with input datafirst we most initial an object from
ifstream
andofstream
on thefstream
Librarygive
person.name
&person.family
from client and make those::tolower
put name and family together and make new string
fullName
maybe you question why we do that??
for better query on database
Train.txt
cause data save like this:
when we gonna know about this name is record on database or not
we must use this format
<person.name>, <person.family>
for searchthen pass
fullName
tobool HaveTicket(string searchContent)
functionRailwayCli/main.cpp
Lines 16 to 34 in 021ebb1
that a bool function, so, return true false value
if data base have same name and family call another method whose name
void ShowTicket(string personFullName)
RailwayCli/main.cpp
Lines 82 to 120 in 021ebb1
that output something like this
The text was updated successfully, but these errors were encountered: