Skip to content

Simple class function #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions oop/class_object.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <iostream>
#include <string>
using namespace std;

class Inventories{
public :
string goods;
string description;
int amount;

void Result_Inventories(){
cout << "This is program of repository \n";
cout << "Input name of goods : ";
cin >> goods;
cout << "Input of description of goods : ";
cin >> description;
cout << "Input total of good : ";
cin >> amount;

cout << "The result is : " << goods << ", " << description << ", " << amount << "\n";
};
};

// make a main program
int main (){
Inventories result;

// call a function
result.Result_Inventories();
return 0;
}


Binary file added oop/class_object.exe
Binary file not shown.