Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- //---------------------------------------------------------------------------
- #include <conio.h>
- #include <iostream>
- #include <stdlib.h>
- #include <stdio.h>
- #pragma hdrstop
- //---------------------------------------------------------------------------
- #pragma argsused
- class vehiculo
- {
- private:
- char placa[10];
- char dueno[50];
- int pasajeros;
- public:
- int getPasajeros ()
- {
- return pasajeros;
- }
- void setPasajeros (int c)
- {
- pasajeros = c;
- }
- };
- using namespace std;
- int main ()
- {
- vehiculo carro;
- carro.setPasajeros (4);
- cout << "Pasajeros: " << carro.getPasajeros () << endl;
- getch ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement