234 Topics

Member Avatar for
Member Avatar for Buolbear4444

So, I'm writing a roguelike game in C++. But, its complaining about a class I made called "Player" in the file "player.h" in the file "monster". When I input into monster this function: [CODE] void attackplayer(Player& hero, bool checkup, bool checkdown, bool checkleft, bool checkright) { if (checkup == true …

Member Avatar for Buolbear4444
0
174
Member Avatar for gendler.max

Hello, I have a question on how to use a class similar to the Grid Class included in the Lawerence Press textbook on C++. The question is, do I have to have the InitGrid function in every paint or no?

0
92
Member Avatar for mgn2683

I have an issue where my content has two different classes assigned to it: left and right. The left column is perfect, but the right column which holds my text begins at the bottom of the first column. Please look here for more: [URL="http://mgndesign.com/draft/"]http://mgndesign.com/draft/[/URL]. Feel free to look at the …

Member Avatar for mgn2683
0
126
Member Avatar for b89smith

I have written two different classes that are in two different files one is LoadData.java and the other is csvReader.java both are in the same folder. In the class LoadData I try to use a public function in csvReader by calling csvReader.getData(), when I compile LoadData, which is after I …

Member Avatar for leiger
0
134
Member Avatar for LloydFarrell

Hi, im still pretty new to PHP and I have just started looking into classes / functions and OOP - I have done loads of searching and watching tutorials and learning from others here on daniweb with great pleasure, I was hoping that someone could fix the problem im having …

Member Avatar for rajarajan2017
0
228
Member Avatar for zreed

I need to code a program for my friend and it has been giving me some difficulties. This needs to have two classes, one called Tester and another called Game. And the data in the Game class needs to be pulled to the tester class after the calculations are finished. …

Member Avatar for jwenting
0
287
Member Avatar for xx_kandikidd_xx

Hi, I'm having trouble with my Java code. It's meant to read in from a csv file and update the elements on the GUI to reflect this e.g. as it reads in one line, images and text appear on the GUI reflecting the data. Anyway, to get the GUI to …

0
93
Member Avatar for marco64

Hello, I would like to know if you know any framework/classes for systems administration in windows/linux environment. Thanks for you replies! Bye, Marco.

0
142
Member Avatar for vivosmith

Hi I found this example on about.com . I understand most of this, but one part is giving me problems in genral. I tried classes before, and it did not go over so well. But since this is someone else code, it might be better than mine :). Thanks [CODE] …

Member Avatar for Fbody
0
100
Member Avatar for dragonflare

[CODE]#include <iostream.h> #include <fstream.h> #include <stdlib.h> #include <string> using namespace std; //const int MAX_SIZE = 10; //char determine_grade(int smarks); class student{ public: student(); //constructor ~student(); //destructor //char grade; //set values void set_mark(int); void set_id(string); void print_students_records(student, int); //get values int get_mark(); string get_id(); private: int mark; string id; }; //void …

Member Avatar for NathanOliver
0
161
Member Avatar for vivosmith

[code=C++]#include (iostream.hpp) class Stocks { public: Stocks( int price); ~Stocks(); int get_price() const {return pps;} int set_price() const {pps;} int the_price_is (int pps); int pps; } int main() { Stocks AMX (35) cout << " Hello, please enter a symbol.\n"; if cin>> AMX; cin.ignore; cin.get; AMX.the_price_is cout<<" 35.\n"; return 0; …

Member Avatar for Fbody
0
115
Member Avatar for sah15

I'm having troubles with a code for a program (involving classes) where I am supposed to input the three sides of a triangle and the program determines whether the triangle is a right triangle, equilateral, isosceles, and scalene, etc. I have only one error preventing me from compiling my program, …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for melissa2185

What I need to do is using classes, design an online address book to keep track of the names, address, phone numbers, and birthdays of family members. The program should be able to handle a maximum of 500 entries. a. Define the class Address that can store a street address, …

Member Avatar for Ezzaral
2
244
Member Avatar for jk8204

I need to design a class to represent an oven control unit containing: - Three constants (COOK, BOIL, SELF_CLEANING) with values of 1, 2, & 3. - Boolean value 'on' to represent oven is on or off - Int value for cooking temp, actual temp, and cook time (in min) …

Member Avatar for Katana24
0
119
Member Avatar for FlippA

Hi all, I have a list of Classes and I want to sort the list of Class by one of the Attributes held within the Classes does anyone know a easy way of doing this. Kind Regards FlippA

Member Avatar for FlippA
0
149
Member Avatar for crh0872

Hello again DaniWeb! I'm designing a dynamic website in PHP, and it's structured so that each page creates the necessary objects (based on what content is being viewed) which get the right information to display. Smarty then organizes this content and makes it look good. The problem is, I have …

Member Avatar for diafol
0
122
Member Avatar for Fbody

I just started an advanced C++ course and my instructor sent around a file with this piece of code: [code]class smallobj // specify a class { public: smallobj() : iData(0){} // Constructor smallobj(int iInValue) : iData(iInValue) {} // Overloaded Constructor ~smallobj() {} // Destructor void setdata(int d) // member function …

Member Avatar for Fbody
0
1K
Member Avatar for 9w43

Hello, I am using Blue J, I have 3 classes, time, date and patient. When I run the patient class, I can put patient details like name, address, DoB, time. The time and date classes are separate classes, how can I store the date (int) and time which I enter …

Member Avatar for mellowmike
0
173
Member Avatar for ceileyg

Hey all - yes, this is another thread asking for some homework help, but I've got a solid start, just looking for some fresh ideas. Anyways, the task is to create a java clock class and access/use it from a driver. I saw something similar on here, but not quite …

Member Avatar for masijade
0
5K
Member Avatar for ninreznorgirl2

I've worked with making classes, but I've never had to use a class in code that I write, so I'm having a hard time. [CODE]#include <iostream> #include <string.h> #include <iomanip> #include <ctype.h> #include "String2.cpp" using namespace std; const int MAX_WORD_LENGTH = 254; // The type definition below permits much easier …

Member Avatar for u8sand
0
203
Member Avatar for Namibnat

I am sorry to ask such a beginner question: I am just learning to use classes and objects in php and would like to know one simple thing - how to you reference one function (or should I call them methods?) from another within the class. When I specify a …

Member Avatar for omoabobade
0
160
Member Avatar for ahmedshayan

1. Create a class Account that has following instance variables: a. private account number (string) b. private account holder name (string) c. private balance (floating-point) d. private account opening date (string) e. profitRate (final, floating-point): 5% for all accounts Supply a default constructor, a parameterized constructor, and a clone constructor. …

Member Avatar for javaAddict
0
781
Member Avatar for sleight

So, hi, this is my first post here. I can't find a good source for my problem here. My problem: Creating a linked node using classes. I managed to create a list of linked nodes but the problem was that I forgot to delete the nodes I created so now …

Member Avatar for sleight
0
190
Member Avatar for Lisa Hoover

Everyone is talking about how open source technology is the answer to budget cuts and belt tightening in the workplace. There's no denying its use is on the rise and, in fact, the Linux server market is predicted to extend into the tens of billions over the next few years. …

0
424

The End.