11 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for AppleR

So basically im creating this python adventure text game. And so far its good. But i have this problem with class instances(Is that the right term?) Say for example i have this class, class monster(object): def __init__(self,health,attack): self.damage = damage self.health = health So then I create a class object(again, …

Member Avatar for AppleR
0
340
Member Avatar for srivardhanms

Hi, Can anyone tell me how to create a class in C++ such that, the instance of that class cannot be created on stack? Am not able to figure out how to do it. Thank-you in advance, Sri

Member Avatar for srivardhanms
1
172
Member Avatar for UKnod

I have a warning that I can;t get rid of: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. I am pretty sure it is becasue I have not dimentioned the variable but how do you dimention an IO.memorystream. …

Member Avatar for UKnod
0
277
Member Avatar for akshay.lahiry

Hi Guys I am trying to create a global object instance and am currently running into a segmentation fault while accessing a member variable. I have a capture.h file and a capture.cpp file //In capture.h struct ringinfo { // a simple struct }; class capture_manager{public: func1(); func2(); ringinfo ringinf ; …

Member Avatar for akshay.lahiry
0
3K
Member Avatar for DavidKroukamp

Hey all, I have been busy building my own chess game and as of now im a bit stomped. Well you see i have an object Board, this object will be initiated and it will create a new frame with various panels one of them being the panel which holds …

Member Avatar for JamesCherrill
1
241
Member Avatar for TrueCoding

Hi Ive got an error message saying "Object reference not set to an instance of an object." It doesnt make sense to me and the troublshooting tips says to make a new keyword, but since Im new to C# I dont fully understand it. Heres the bit of code thats …

Member Avatar for TrueCoding
0
255
Member Avatar for naffan

Hi all, Wonder if someone could please lend a hand, I have a courses.txt file which is read into a Course String array I also have a program.txt (A list of 8 courses required to pass the program) There's a menu option to change the Program, however a condition of …

Member Avatar for JamesCherrill
0
206
Member Avatar for daudiam

I was reading an SCJP book by Khalid Mughal and I came across a statement [QUOTE]Enum constants are static members[/QUOTE] and another [QUOTE]Enum constant is an instance of its enum type[/QUOTE]. I am unable to reconcile the 2 statements. Are the constants static members or are they instances ? (Instances …

Member Avatar for daudiam
0
361
Member Avatar for Peter_TARAS

Hi! I designed a class in Python to do stuffs related to genetic algorithms. I have a method in this class, which should provide a sort of log to keep the track of the populations during the evolution. I mean, I provide the filename as a string argument to this …

Member Avatar for vegaseat
0
17K
Member Avatar for gorbulas

I have a class, and create 4 instances of this class as per below: [code=PYTHON]class AuctionList: def __init__(self): self.Clear_Auction_List() # Data auctionList = [] #Functions .... [/code] [code=PYTHON]currentAuctionList = AuctionList() previousCurrentAuctionList = AuctionList() finishedAuctionList = AuctionList() successfulAuctionList = AuctionList()[/code] The class has a list variable and a few functions to …

Member Avatar for gorbulas
0
4K
Member Avatar for Meinsamr

Create New instance of a class, but use a variable value as name..Possible? And yes, I've searched everywhere, but haven't found any useful. So i'll start by asking here. example code.. Error message: A local variable named 'className' cannot be declared in this scope because it would give a different …

Member Avatar for ddanbe
0
184

The End.