Sabtu, 11 Maret 2017

What are anonymous objects and classes in C++ Programming

An object which has no name is known as an anonymous object. Syntax for creating an anonymous object is as follows:   ClassName(params-list);   An anonymous object can be created and used in any statement without using any name. It is automatically destroyed after the control moves on to the next statement. Following program demonstrates an anonymous object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include <iostream> using namespace std; class Student { private: string name; string regdno; int age; string branch;

The post What are anonymous objects and classes in C++ Programming appeared first on Coding Security.


What are anonymous objects and classes in C++ Programming
read more

Tidak ada komentar:

Posting Komentar