Page 1 of 2 12 LastLast
Results 1 to 12 of 22

Thread: C++ Vehicle Registeration System

  1. #1
    Arslan-vu's Avatar
    Arslan-vu is offline Senior Member+
    Last Online
    2nd March 2018 @ 09:50 PM
    Join Date
    22 Mar 2013
    Gender
    Male
    Posts
    326
    Threads
    115
    Credits
    447
    Thanked
    88

    Default C++ Vehicle Registeration System

    C++ Vehicle Registeration System

    Compile this code in dev c++


    #include<iostream.h>
    #include<conio.h>
    #include <cstring>

    enum VehicleClass {MotorCycle, Car, Van, SportsCar, Pickup, Truck};

    struct Vehicle
    {
    char vehicleType[20];
    char maker[20];
    int yearOfManufacture;
    char engineNo[20];
    char registrationNo[20];
    unsigned int vehiclePrice;
    VehicleClass vehicleClass;
    };

    struct Owner
    {
    char ownerName[20];
    char fatherName[20];
    char address[30];
    int dateOfPurchase;
    int monthOfPurchase;
    int yearOfPurchase;
    char transferredFrom[20];
    Vehicle vehicle;
    };

    void view (Owner *p);
    void transfer (Owner *p);
    void registerr (Owner *p);


    main()
    {

    Owner owner = {"Arslan Arshad", "Muhammad Arshad", "Lahore pakistan", 17, 04, 2012, "None", {"2 wheel", "Honda", 2012, "ABC-143", "any123", 100000, Car }};
    Owner *p = &owner;
    int c;


    cout<<"Vehicle Registeration System";
    cout<<endl;
    cout<<"============================";
    cout<<endl;
    cout<<endl;
    cout<<endl;
    cout<<"1- View Vehicle Information";
    cout<<endl;
    cout<<"2- Tranfer Vehicle";
    cout<<endl;
    cout<<"3- Register Vehicle";
    cout<<endl;
    cout<<"0- Exit from Program";
    cout<<endl;
    cout<<endl;
    cout<<"Enter Your Choice:";
    cin>>c;
    switch (c)
    {
    case 1:
    system("cls");
    view(p);
    break;
    case 2:
    system("cls");
    transfer(p);
    break;
    case 3:
    system("cls");
    registerr(p);
    break;
    case 0:
    exit (0);
    break;
    default:
    cout<<"\nPlease enter a valid option";
    getche();
    system("cls");
    main();
    break;

    }
    }



    void view(Owner *p){
    cout<<"====================";
    cout<<endl;
    cout<<"Vehicle Information:";
    cout<<endl;
    cout<<"====================";
    cout<<endl;
    cout<<endl;
    cout<<"Registeration No: "<<p->vehicle.registrationNo;
    cout<<endl;
    cout<<"Vehicle Type: "<<p->vehicle.vehicleType;
    cout<<endl;
    cout<<"Vehicle Class: "<<p->vehicle.vehicleClass;
    cout<<endl;
    cout<<"Vehicle Maker: "<<p->vehicle.maker;
    cout<<endl;
    cout<<"Year of Manufacture: "<<p->vehicle.yearOfManufacture;
    cout<<endl;
    cout<<"Engine No: "<<p->vehicle.engineNo;
    cout<<endl;
    cout<<"Vehicle Price: "<<p->vehicle.vehiclePrice;
    cout<<endl;
    cout<<endl;
    cout<<endl;

    cout<<"==================";
    cout<<endl;
    cout<<"Owner Information:";
    cout<<endl;
    cout<<"==================";
    cout<<endl;
    cout<<endl;
    cout<<"Owner Name: "<<p->ownerName;
    cout<<endl;
    cout<<"Father Name: "<<p->fatherName;
    cout<<endl;
    cout<<"Address: "<<p->address;
    cout<<endl;
    cout<<"Date of Purchase: "<<p->dateOfPurchase<<" / "<<p->monthOfPurchase<<" / "<<p->yearOfPurchase;
    cout<<endl;
    cout<<"Transfered Form: "<< p->transferredFrom;
    cout<<endl;

    getche();
    system("cls");
    main();
    }


    void transfer(Owner *p){

    strcpy(p->transferredFrom, p->ownerName);

    cout<<"=======================";
    cout<<endl;
    cout<<"Vehicle Transfer form:";
    cout<<endl;
    cout<<"=======================";
    cout<<endl;
    cout<<"Buyers Name: ";
    cin>>p->ownerName;
    cout<<endl;
    cout<<"Father Name: ";
    cin>>p->fatherName;
    cout<<endl;
    cout<<"Address: ";
    cin>>p->address;
    cout<<endl;
    cout<<"Date of Purchasing: ";
    cin>>p->dateOfPurchase;
    cout<<endl;
    cout<<"Month of Purchasing: ";
    cin>>p->monthOfPurchase;
    cout<<endl;
    cout<<"Year of Purchasing: ";
    cin>>p->yearOfPurchase;
    system("cls");
    view(p);
    }


    void registerr(Owner *p){
    cout<<"====================";
    cout<<endl;
    cout<<"Vehicle Information:";
    cout<<endl;
    cout<<"====================";
    cout<<endl;
    cout<<endl;
    cout<<"Registeration No: ";
    cin>>p->vehicle.registrationNo;
    cout<<endl;
    cout<<"Vehicle Type: ";
    cout<<p->vehicle.vehicleType;
    cout<<endl;
    cout<<"Vehicle Maker: ";
    cin>>p->vehicle.maker;
    cout<<endl;
    cout<<"Year of Manufacture: ";
    cin>>p->vehicle.yearOfManufacture;
    cout<<endl;
    cout<<"Engine No: ";
    cin>>p->vehicle.engineNo;
    cout<<endl;
    cout<<"Vehicle Price: ";
    cin>>p->vehicle.vehiclePrice;
    cout<<endl;
    cout<<endl;
    cout<<endl;

    cout<<"==================";
    cout<<endl;
    cout<<"Owner Information:";
    cout<<endl;
    cout<<"==================";
    cout<<endl;
    cout<<endl;
    cout<<"Owner Name: ";
    cin>>p->ownerName;
    cout<<endl;
    cout<<"Father Name: ";
    cin>>p->fatherName;
    cout<<endl;
    cout<<"Address: ";
    cin>>p->address;
    cout<<endl;
    cout<<"Date of Purchasing: ";
    cin>>p->dateOfPurchase;
    cout<<endl;
    cout<<"Month of Purchasing: ";
    cin>>p->monthOfPurchase;
    cout<<endl;
    cout<<"Year of Purchasing: ";
    cin>>p->yearOfPurchase;
    cout<<endl;
    system("cls");
    view(p);
    }
    Attached Images Attached Images  

  2. #2
    Malik-Hassan's Avatar
    Malik-Hassan is offline Senior Member+
    Last Online
    18th October 2014 @ 06:24 AM
    Join Date
    31 Aug 2013
    Location
    Sahiwal pak
    Age
    30
    Gender
    Male
    Posts
    145
    Threads
    8
    Credits
    0
    Thanked
    7

    Default

    Very nice and great

  3. #3
    imran135 is offline Senior Member+
    Last Online
    22nd March 2016 @ 12:09 PM
    Join Date
    07 Sep 2013
    Age
    31
    Gender
    Male
    Posts
    37
    Threads
    1
    Credits
    0
    Thanked
    0

    Default

    Meri to help kro plz. Mere pas catv max player pro ka main us ko use krna chata ho. Ye software chal to parta ha magar main us ko regestar kasay kro plz help ...

  4. #4
    imran135 is offline Senior Member+
    Last Online
    22nd March 2016 @ 12:09 PM
    Join Date
    07 Sep 2013
    Age
    31
    Gender
    Male
    Posts
    37
    Threads
    1
    Credits
    0
    Thanked
    0

    Default

    Meri to help kro plz. Mere pas catv max player pro ka main us ko use krna chata ho. Ye software chal to parta ha magar main us ko regestar kasay kro plz help ...

  5. #5
    RaoG is offline Junior Member
    Last Online
    23rd November 2013 @ 06:45 PM
    Join Date
    22 Sep 2013
    Age
    29
    Gender
    Male
    Posts
    20
    Threads
    1
    Credits
    0
    Thanked
    2

    Default

    A.O.A dear ma agr TC koi bhi program compile karta hon to ye errors aty han link karny sy phly
    1-unable to open include file 'iostream.h'
    2-Unable to open include file 'conio.h'
    3-Unable to creat output file 'noname00. Obj'

    or jb link karta hon to ye error ata hy
    Unable to open file 'cos. Obj'

    liken koi cos .obj ki file maen bnta hi nae or han ye error tc maen ata hy dev nae ata actual dev use maen thoda moshkil hy us k error find krna mushkil hy
    plz u tell me how i remove this errors i am waiting for ur ans

  6. #6
    RaoG is offline Junior Member
    Last Online
    23rd November 2013 @ 06:45 PM
    Join Date
    22 Sep 2013
    Age
    29
    Gender
    Male
    Posts
    20
    Threads
    1
    Credits
    0
    Thanked
    2

    Default

    A.O.A dear ma agr TC koi bhi program compile karta hon to ye errors aty han link karny sy phly
    1-unable to open include file 'iostream.h'
    2-Unable to open include file 'conio.h'
    3-Unable to creat output file 'noname00. Obj'

    or jb link karta hon to ye error ata hy
    Unable to open file 'cos. Obj'

    liken koi cos .obj ki file maen bnta hi nae or han ye error tc maen ata hy dev nae ata actual dev use maen thoda moshkil hy us k error find krna mushkil hy
    plz u tell me how i remove this errors i am waiting for ur ans

  7. #7
    Arslan-vu's Avatar
    Arslan-vu is offline Senior Member+
    Last Online
    2nd March 2018 @ 09:50 PM
    Join Date
    22 Mar 2013
    Gender
    Male
    Posts
    326
    Threads
    115
    Credits
    447
    Thanked
    88

    Default

    dear mene turbo c bht kam use kiya hai men apni field men just dev c++ use karta hun mjy yehe easy lagta hai men yeh program us men check karunga k error kyun ata hai aur ek bat yeh k dev c++ advance hai turbo c se is men iostream aur cout aur cin function use hoty hain for basic input or out jabk turbo c men printf aur scanf function use hoty hain i hope u unterstand what i said.

  8. #8
    jameel225's Avatar
    jameel225 is offline Senior Member+
    Last Online
    10th September 2022 @ 03:40 AM
    Join Date
    19 Oct 2006
    Location
    Quetta
    Posts
    294
    Threads
    52
    Credits
    81
    Thanked
    15

    Default

    its just copy paste bro ...anyways thanks ..
    Always Be Happy

  9. #9
    Arslan-vu's Avatar
    Arslan-vu is offline Senior Member+
    Last Online
    2nd March 2018 @ 09:50 PM
    Join Date
    22 Mar 2013
    Gender
    Male
    Posts
    326
    Threads
    115
    Credits
    447
    Thanked
    88

    Default

    jameel225 prove it copy paste u knw am a student of virtual university i have a programming subjects mine study program is bcs(bachelor of computer science )

  10. #10
    GeoArain's Avatar
    GeoArain is offline Senior Member+
    Last Online
    21st November 2015 @ 09:42 PM
    Join Date
    05 Sep 2013
    Location
    hyd
    Age
    35
    Gender
    Male
    Posts
    346
    Threads
    3
    Credits
    0
    Thanked
    11

    Default

    Thanks for Sharing
    ARAIN 007

  11. #11
    Alibigboss's Avatar
    Alibigboss is offline Senior Member+
    Last Online
    22nd July 2022 @ 06:46 PM
    Join Date
    17 Jan 2014
    Location
    Faisalabad
    Age
    33
    Gender
    Male
    Posts
    406
    Threads
    30
    Credits
    353
    Thanked
    40

    Default

    Very nice yar..

  12. #12
    karachi1234 is offline Senior Member+
    Last Online
    27th April 2016 @ 10:13 AM
    Join Date
    07 Jan 2010
    Location
    I live In Lyari Town Karachi City
    Gender
    Male
    Posts
    1,542
    Threads
    232
    Credits
    0
    Thanked
    17

    Default

    pleae you will help to me about this that how can made this program or application in visual studio 2010?
    please you will reply to me as soon as possible
    main aap kay jawab ka intezaar karogaa

Page 1 of 2 12 LastLast

Similar Threads

  1. System Boost Elite v2.7.2.8 Pro Portable
    By Friend_Sania in forum English IT Zone
    Replies: 2
    Last Post: 15th April 2014, 08:43 PM
  2. my single link games collection
    By madeel05 in forum PC Games
    Replies: 5
    Last Post: 10th December 2013, 10:34 PM
  3. Optimize Windows System For Peak Performance
    By ali_gillani_20 in forum General Discussion
    Replies: 0
    Last Post: 5th September 2009, 12:33 PM
  4. IBM System Problem......Plz Help!!!!
    By Naveed Rasheed in forum Ask an Expert
    Replies: 6
    Last Post: 30th August 2008, 03:54 PM
  5. Replies: 15
    Last Post: 31st May 2007, 02:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •