Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Jun 2001
Offline Last Active Yesterday, 02:10 PM

Posts I've Made

In Topic: How did you learn making games?

18 April 2016 - 12:15 PM

They were popular in much of the US as well in the peak time frame, from 1990-1995, hitting a sudden drop-off with the invention and popularization of the World Wide Web.


For many of us (including me) the BBS was my preferred way to access Usenet groups, since paid access to a BBS that processed subjects I was interested in was far cheaper than access to the school's SLIP services as a non-student.



Haven't heard anyone mention SLIP in a long time, we used to use slurp over our terminals to access the internet and browse the web with graphics using Mosaic!  It sure beat Lynx text browser, although the text browser was great for looking up fantasy football stats :)


I suppose I should answer the questions here too:


I 1st programmed BASIC on an Apple IIe, 5th grade, probably 1986, and I made text adventure games.  I never truly "learned the language" I only learned the parts of the language needed to make text games, but, considering it was simple input and if/then mechanisms, it didn't take too long.


No, I didn't upload any of those early games anywhere, and games I'm made more recently have mostly been just for me, or I've shared wqith a few friends as a hobby.


Occasionally, I'll get the urge to dabble with game making, but it's not as often any more, and if I do, again, it's just for fun as a hobby.

In Topic: Memory Allocation

18 April 2016 - 12:03 PM

 sizeof(struct Node *) <- isn't this wrong??


for a node you should allocate sizeof(struct node) otherwise you allocate only pointer size space (4 or 8 bytes?)


Yes, this is the problem, you should be calling malloc(sizeof(struct Node)) .


However, you can make life easier using new and delete, like this

// in push()
Node* temp = new Node;
// later, in pop()
delete temp;


And, I just noticed, in pop(), why are you calling malloc() on temp again, then immediately assigning temp to headNode?  Don't malloc temp in pop().


You need to understand memory allocation a little more, then you should be able to tackle this problem fine.

In Topic: Memory Allocation

17 April 2016 - 06:54 PM

Should tailNode be updated in pop()?  What happens if tailnode is pointing at headNode?  

In Topic: Data Structures Help!

14 April 2016 - 01:59 PM

A few things:

#0, you really should've started a new thread for this.


#1, there's a major leak since you call malloc() every time push is called, you need to have a cooresponding call to free() when you pop or pop_all.  My suggesiton is to make pop() such that it calls free() on the node being deleted, and then, in pop_all, just call pop() until isEmpty() is true.


#2, you shouldn't have Queue as an include file (.inl).  Just make it a separate .cpp file and include it when compiling.


#3, it's bad practice to have a single include file (LibIncludes.h) which includes all the include files you need.  Just include the files the current file needs to operate properly on it's own.


#4, the Queue class should only be responsible for handling the data for insertion and retrieval, it should not be printing as well; rather, retreive the data from the Queue class, and print the results in the main class (or make a separate class call QueuePrint if you so desire).  Right now your Queue class is useless as an actual Queue.  it simply prints the data it has, a user can't use it at all to add and retreive items for use.


Just a few thoughts I had.


good luck!

In Topic: Overheating Computer

12 April 2016 - 09:15 AM

Years ago I had a DSL modem that started acting bad.  I was looking at it, and it was really hot!  So, I pointed a fan at it and, BAM!, no more connection or throughput problems!


When I moved out, my roommate used the modem in his room, but he didn't have a fan;  his solution, a bag of frozen peas sitting on top of it.