Commit 6efb3459 authored by Breno Rilho Lemos's avatar Breno Rilho Lemos 💬

Introduction to classes

#include <iostream>
using namespace std;
#define SIZE 10
class myclass {
double local = 3.10; // private stuff of myclass
public: // public stuff of my class (function members)
double func(int m); // function prototype
double myclass::func(int m) {
return m * local;
int main() {
myclass c1;
int m;
cin >> m;
cout << c1.func(m);
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment