I am new to C++, and I am making a simple RPG game. I have an 'Item' class, which has properties and methods that all items will have. I need to be able to:
a) Inherit from this class to make a class with the item properties and methods, along with new ones
b) Make a new instance of this class in my main class. For example in vb.net:
Class MainClass
dim sword as new ItemClass
End Class
Yesterday I've got a notification that Windows Hello couldn't recognize me and asked if I would like to improve it after I manually entered my PIN in the dark If it weren't for an article like this, I would still think that there's something wrong with my camera. I can just imagine how many people are not reading tech news and are still confused.
For quite a while now I've been using my own hosted nextcloud server for both mobiles and PCs/laptops. Also all my personal systems run windows 11 pro for workstation or windows 11 ltsc. All using local accounts. What annoys me is that MS keeps trying to force you to "use this (MSA) account system wide". Everything at home is on my own DC/AD. Why is this even a question? Why is MS forcing this onto people? Sure for windows home versions do whatever you want. But for pro/ pro for workstation or ltsc no. Just don't.
Question
McDonger
I am new to C++, and I am making a simple RPG game. I have an 'Item' class, which has properties and methods that all items will have. I need to be able to:
a) Inherit from this class to make a class with the item properties and methods, along with new ones
b) Make a new instance of this class in my main class. For example in vb.net:
I have tried the following in C++:
However this gives me the error:
error C2061: syntax error : identifier 'ItemClass'
so it isn't recognising the other class? Thanks for any help :)
Link to comment
https://www.neowin.net/forum/topic/594046-c-how-to-create-instance-of-another-class/Share on other sites
6 answers to this question
Recommended Posts