Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
MY FIRST OBJECT ORIENTED PROGRAM
//clang 3.8.0 #include <iostream> using namespace std; class stud { public: char name[30],clas[10]; int rol,age; void enter() { cout<<"Enter Student Name: "; cin>>name; cout<<"Enter Student Age: "; cin>>age; cout<<"Enter Student Roll number: "; cin>>rol; cout<<"Enter Student Class: "; cin>>clas; } void display() { cout<<"\n Age\tName\tR.No.\tClass"; cout<<"\n"<<age<<"\t"<<name<<"\t"<<rol<<"\t"<<clas; } }; int main() { class stud s; s.enter(); s.display(); cin.get();//use this to wait for a keypress }
run
|
edit
|
history
|
help
0
test
function returning a function demo
Example of custom deleter to manage a resource.
Error
STL Stack, C ++
std::set custom ordering with composition
insertion sort
34534
user defined exception
Graphs Iteration2 Directed Graphs