cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
can we make a class without any data mem
can we make a class without any data member ? but it may have member functions !
Aug 18, 2013 at 5:39pm UTC
Rayan jutt
(24)
can we make a class without any data member ? but it may have member functions ! in c++
Aug 18, 2013 at 5:46pm UTC
LB
(13399)
Yes, but the only reason for the member functions to not be static is if you differentiated instances by their address. Or it could be a base class that other classes extend, which is more useful and more likely.
Last edited on
Aug 18, 2013 at 5:47pm UTC
Aug 18, 2013 at 6:08pm UTC
vlad from moscow
(6539)
You may even to make an empty class.:)
class A {};
Last edited on
Aug 18, 2013 at 6:09pm UTC
Topic archived. No new replies allowed.