Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Help with C++

Name: Anonymous 2006-07-16 14:29

I'm learning how to write a roguelike, and it's pretty much the first real programming project i have ever done. I have studied C++ for a bit at school and on my spare time, but i know only the basics, and i thought that programming a simple game would be good learning. I'm trying to make a character creator where you choose a race and a class, then the program rolls your stats, adding different bonuses based on classes and races, but i run into this error:

100 C:\Dev-Cpp\char.c statement cannot resolve address of overloaded function

I'm trying to write the stats to a simple text file, but the program tells me that. What gives?

Name: Anonymous 2006-07-20 14:19

OH SHI--

The reason I believe that getters and setters are usually bad is because they don't really do anything specific with the member data. Think about, for instance, a string class. In a particularly well coded implementation, you can't necessarily access where the string itself is stored (perhaps like a character array or a stream) like you would with getters and setters, but you can work through the interface to do what you want. That's data hiding.

If you realise stuff like Cnum is really just a data structure, you can spend less time coding unnecessary functions.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List