Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for pendo826

Hey my doubly linked list remove duplictes function will only work when the players in the list are together as in position 1 and 2 or 3 and 4. Otherwise if there not together it will delete the two players. For example, if i have luis suarez at position 1 …

Member Avatar for Liuqahs15
0
214
Member Avatar for pendo826

i need to restrict the user from inputting an integer and string when inputting a char. I have a method for an integer i just need to adapt it for a char. Can anyone help me with this. char getChar() { char myChar; std::cout << "Enter a single char: "; …

Member Avatar for Lucaci Andrew
0
195
Member Avatar for pendo826

0 down vote favorite I am currently making an application to store employee details such as name, id and email address. I am doing this using a HashMap. I am currently having difficulty with a searchByName,id and email address methods. How would i go about writing one ? Here is …

Member Avatar for JamesCherrill
0
1K
Member Avatar for pendo826

Hey i am making an application that stores employee's details and the output is different than what it should be i was expecting the output to be the toString() in the employee class can anyone see anythin wrong: //Imports: //******************************************************************** //Employee Class. public class Employee { //Variables. private String employeeName; …

Member Avatar for Krokcy
0
185
Member Avatar for pendo826

import javax.swing.JFrame; public class MainApp { public static void main(String[] args) { new MainApp().start(); } public void start() { CalculatorUI obj = new CalculatorUI(); obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); obj.setSize(275,275); obj.setVisible(true); } } import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JTextField; public class CalculatorUI extends JFrame { //Variables. …

Member Avatar for pendo826
0
148
Member Avatar for pendo826

There's something wrong with the curly brace's can anyone see where please. //****************************************************************************************** //Header file for LinkedList.cpp. //****************************************************************************************** #ifndef LINKEDLIST_H #define LINKEDLIST_H //****************************************************************************************** //Declaring templates for classes. //****************************************************************************************** template<class Datatype> class LinkedListNode; template<class Datatype> class LinkedList; template<class Datatype> class LinkedListIterator; //****************************************************************************************** //Class: LinkedListNode. //Description: This is a class for the …

Member Avatar for TrustyTony
0
397
Member Avatar for pendo826

Hey i keep gettin syntax errors with my header file can someone please help me. //****************************************************************************************** //Header file for LinkedList.cpp. //****************************************************************************************** #ifndef LINKEDLIST_H #define LINKEDLIST_H //****************************************************************************************** //Declaring templates for classes. //****************************************************************************************** template<class Datatype> class LinkedListNode; template<class Datatype> class LinkedList; template<class Datatype> class LinkedListIterator; //****************************************************************************************** //Class: LinkedListNode. //Description: This is a …

Member Avatar for majorawsome
0
288
Member Avatar for pendo826

Hey i want to know how to make my single linked list a double can anyone help? #include "MyLinkedList.h" #include <iostream> int main() { SListNode<int>* list = new SListNode<int>; //Set 3 LinkedList nodes to contain 3 int variables. list->m_data = 10;//(1). list->m_next = new SListNode<int>; list->m_next->m_data = 20;//(2). list->m_next->m_next = …

Member Avatar for raptr_dflo
0
141
Member Avatar for pendo826

[CODE]//Header file for Array.cpp. #ifndef ARRAY_H #define ARRAY_H template<class Datatype> class Array { private: //Template for use with the Array's data type. //Member Variables. int size; int grow_size; int num_elements; Datatype* m_array; public: //Constructor. Array( int p_size) { m_array = new Datatype[p_size]; size = p_size; } //Destructor. ~Array() { if( …

Member Avatar for raptr_dflo
0
183
Member Avatar for pendo826

My methods dont seem to be working for example void Resize doeznt do anything. AM i using it in the wrong way oris the method faulty. [CODE]//Header file for Array.cpp. #ifndef ARRAY_H #define ARRAY_H template<class Datatype> class Array { private: //Template for use with the Array's data type. //Member Variables. …

Member Avatar for pendo826
0
466
Member Avatar for pendo826

I have errors for the template can any1 see anything wrong??? //Array.h [CODE]//Header file for Array.cpp. class Array { private: //Template for use with the Array's data type. //Member Variables. int size; int grow_size; int num_elements; public: //Functions. template<class Datatype> int m_size; Datatype* m_array; //Consturctor. Array( int p_size) { m_array= …

Member Avatar for jaskij
0
238
Member Avatar for pendo826

Hey im writing a program and i have countless errors. Im following tuturiols and i have no clue what has happened. Thats the list. Im screwed. can anyone spot anything to get me kick started into a functional game. 1>c:\users\conor\documents\visual studio 2010\projects\ca2\ca2\weapon.h(21): error C2590: 'load' : only a constructor can …

Member Avatar for gusano79
1
747
Member Avatar for pendo826

In this .cpp i have an error saying member function cannot be redeclared. I dont know what it needs to get rid of the error obviously it needs a declaration somewhere but where? [CODE]#include <iostream> #include <ctime> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const …

Member Avatar for Moschops
0
114
Member Avatar for pendo826

Can anyone see the problem with my method ATTACK [CODE]#include "Monster.h" #include "Player.h" #include "Weapon.h" #include <iostream> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const std::string& weaponName) { Name = Name; hitPoints = hitPoints; Weapon weapon; miss = miss; damage = damage; weapon.Name = weaponName; …

Member Avatar for pendo826
0
134
Member Avatar for pendo826

Hey i have no idea whats goin wrong with this i think its to do with the fact that its in private but i have an error with calling weapon in the monster class (Monster.cpp) the error states that it is inaccessable :S here is my code: [CODE] //Monster.h #ifndef …

Member Avatar for pendo826
0
125
Member Avatar for pendo826

Can Anyone advise me on the problem with the namespace in this code im getting an error. [CODE]//Main. #include "Weapon.h" #include "Room.h" #include <iostream> #include <fstream> using namespace std; int main() { ifstream myfile; string line; myfile.open("BronzeSword.txt"); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout << line …

Member Avatar for pendo826
0
153
Member Avatar for pendo826

Hey im a real noob at c++ and im trying to understand creating rooms setting a default and using a .txt file for room details. but i dont understand it. Im looking at some code from my lecturer and i dont understand were the wiz0-2.save comes from can some tell …

Member Avatar for mikrosfoititis
0
131
Member Avatar for pendo826

I want to place an object into an array so that when i call the array my stats, inventory objects will show up is it possible ? here is my code: [CODE] void displayStats() { const int SIZE = 11; string stats[SIZE]; status Status = {100,20}; cout << "******Stats******\n"; stats[0] …

Member Avatar for raptr_dflo
0
232
Member Avatar for pendo826

can anyone see why the status.health wont take away the 20 ???? [CODE]#include <iostream> #include <string> // To allow use of Strings. using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void displayInventory(); void displayStats(); void statsObject(); void gameOver(); void stats(); void inventory(); void exitGame(); int playGame(); class status{ public://Access …

Member Avatar for pendo826
0
189
Member Avatar for pendo826

Hi[QUOTE]just wondering how i would set up a menu so that i can call anytime when pressing "M". im nearly sure it would have to be a loop but im not quite sure how to do it. can anybody help? thanks [/QUOTE]

Member Avatar for pendo826
0
147
Member Avatar for pendo826

Hi need some help. I dont really know much about classes and objects and i dont understand tutorials and i want to make it that when a user picks up objects it will be added to an inventory that i have set up and also when the inentory is full …

0
61
Member Avatar for pendo826

[CODE]#include <iostream> #include <string> using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void displayInventory(); void inventory(); void exitGame(); int playGame(); int main() { //Menu Text. cout<< "\t******Menu******\n\n"; cout<< "Please choose one of the following:\n"; cout<< "1 -Play Game.\n"; cout<< "2 -Exit.\n"; int choice; cout<< "Choice: "; cin>> choice; string …

Member Avatar for mazzica1
0
251
Member Avatar for pendo826

[CODE]#include <iostream> #include <string> using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void exitGame(); int playGame(); int main() { //Menu Text. cout<< "\t******Menu******\n\n"; cout<< "Please choose one of the following:\n"; cout<< "1 -Play Game.\n"; cout<< "2 -Exit.\n"; int choice; cout<< "Choice: "; cin>> choice; string name; switch (choice) { …

Member Avatar for pendo826
0
2K