Learn Better | Life Better

User defined data type | object oriented programming with C++

In this article we are study on user defined data type with object oriented programming C++.
User Defined data type

Structure and classes

we  know that OPP are very advanced pictures for programmer then user can self create data types. we have a huge user defined data types such as struct and union in C files these data types or legal in C++ more features have been added to make them suitable for object oriented programming.C++ also permits us to define another user defined data type Now to class which can be used, just like any other basic data types to declare variable the class variable or no and object which are the central focus of object oriented programming more about this data type discuss in this article.

User Defined data type
User Defined data type

An enumerated data type is another user defined data type which provide a way for attaching number two numbers, there by increase compressibility of the programming code the Enum keyword from C language automatically enumerated list of word by assigning their value 0,1,2 and so on. This facility are provide h n alternative mean for create symbolic constant the syntax of enum statement is similar to that of the struct statement example

Enum shape{ circle ,square ,Triangle}

Enum colour{ red ,blue, green ,yellow}
Enum position{ off ,on }
Enum week {Sunday ,Monday, Tuesday, Thursday ,Wednesday Friday, Saturday }


The user defined data type for the enumerated data type differ slightly in C++ is enumerated data types.

No comments:

Post a Comment

सवाल पूछने के बाद "Notify me" आप्शन को ✔(Right Mark) करे, ताकि आपके पूछे गये सवाल का जवाब मिलने पर आपको सुचना मिल जाये:-