The keyword abstract

I was just wondering if it would be correct for me to use the abstract keyword which seems to be specific to Visual Studio. From what I have found I can use this instead of defining a pure virtual function to form an ABC. I haven't been able to find much on the subject so any filling in would be greatly appreciated! Thanks
closed account (z05DSL3A)
I think you are talking about C++/CLI, Language Features for Targeting the CLR may shed some more light on this for you.
Last edited on
Ahhh, thank you very much. I first saw this used when I was writing an ABC in Visual C++ 2008 Express. The intellisense (sp?) identified my class as class className abstract, I writing code in Native C++.
Last edited on
I am Rammohan from Bangalore and working as a Technical lead in big IT firm .
Solution for your answer is follows:

What is Data Abstraction?
A data abstraction is a simplified view of an object that includes only features one is interested in while hides away the unnecessary details. In programming languages, a data abstraction becomes an abstract data type or a user-defined type. In OOP, it is implemented as a class.

The concept of abstraction relates to the idea of hiding data that are not needed for presentation. The main idea behind data abstraction is to give a clear separation between properties of data type and the associated implementation details. This separation is achieved in order that the properties of the abstract data type are visible to the user interface and the implementation details are hidden. Thus, abstraction forms the basic platform for the creation of user-defined data types called objects. Data abstraction is the process of refining data to its essential form. An Abstract Data Type is defined as a data type that is defined in terms of the operations that it supports and not in terms of its structure or implementation.

In object-oriented programming language C++, it is possible to create and provide an interface that accesses only certain elements of data types. The programmer can decide which user to give or grant access to and hide the other details. This concept is called data hiding which is similar in concept to data abstraction.

Something like this will help you:

class X abstract {
virtual void ramu() {}

int main() {
X * MyX = new X;

class Ramu {
virtual void function1() abstract {}
virtual void function2() = 0 {}
Rammohan Alampally,
Technical Lead,
Bangalore, India. -> Worlds first Web based Windows O/S is a Brain Chaild of Rammohan
Oh dear. Another spam post...
Topic archived. No new replies allowed.