#include<iostream> using namespace std; class Class { private: int val; public: void func(int a ) { val=a; cout<<val<<endl; } }; void main() { Class *cls; cls=new Class; cls->func(10); delete cls; }