Hi
Can we define interfaces in c++ using visulastudio?
if yes plz help me in defining interfaces in c++ with example...
Thanks in advance
Hi
Can we define interfaces in c++ using visulastudio?
if yes plz help me in defining interfaces in c++ with example...
Thanks in advance
C++ does not have a concept of "interface" per se. They are usually emulated with abstract classes with pure virtual functions. Moreover, classes are usually substituted with structs, since default access modifier for those is public. Hence,
struct IFoo
{
virtual void Bar() = 0;
}
Also, see this.
using namespace System;
interface class IFoo { String^ GetName(); };