Forum: C++ Apr 5th, 2009 |
| Replies: 5 Views: 382 Ok here's the finished program :)
/*~~~prog3.cpp~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| "Waiting ...waiting... Next!" |
| Program... |
Forum: C++ Apr 2nd, 2009 |
| Replies: 5 Views: 382 ArkM: Thanks for the tip on inserting the code -- didn't realize there was a difference.
Also, this is a presentation, rather a work in progress: I felt like sharing:icon_cool:
And thanks Adam |
Forum: C++ Apr 2nd, 2009 |
| Replies: 5 Views: 382 Working on a simulation which closely resembles waiting in a line at a bank. Program runs the simulation based on the user's inputs of # of servers, simulation time, average time between arrival, and... |
Forum: C++ Mar 5th, 2009 |
| Replies: 7 Views: 1,266 Alrighty: here's the completed program -- one issue left is that if there are 2 entries with the same key, the program won't find it. Also, after the third choice, user must enter their choice a... |
Forum: C++ Mar 2nd, 2009 |
| Replies: 7 Views: 1,266 ****Note:
Program is not complete: I'm still working on bool erase (const KeyType key);
AND I'm still trying to figure out how to incorporate my Node *LinkedList::find(const KeyType key).... it's... |
Forum: C++ Mar 2nd, 2009 |
| Replies: 7 Views: 1,266 Ok...the insert function problem has been solved...
/*~~~linkedlist.h~~~*/
#include <iostream>
#include <string>
using namespace std;
typedef struct Articles ElementType;
typedef... |
Forum: C++ Mar 1st, 2009 |
| Replies: 7 Views: 1,266 typedef Node * NodePointer;
NodePointer is a pointer to a type of class Node. Thus, NodePointer nPtr = new Node(dataValue); is declaring nPtr as type NodePointer, and it is being set to a new... |
Forum: C++ Mar 1st, 2009 |
| Replies: 7 Views: 1,266 ok so i fiddle with it some more, managed to get the first node into the list ...here's the insert function (i didn't change any other parts of the program)
void LinkedList::insert(const... |
Forum: C++ Mar 1st, 2009 |
| Replies: 7 Views: 1,266 another thing to add - when i run the program, this is the error
Crawford:2000:EPa Diane Crawford Editorial pointers
3 [main] program2 3416 _cygtls::handle_exceptions: Exception:... |
Forum: C++ Mar 1st, 2009 |
| Replies: 7 Views: 1,266 Ok, so I am befuddled. Each individual file compile fine, no errors. When I compile all together and create an executable, no errors. But, when I run the program, I am getting an error. I have it... |
Forum: C++ Feb 28th, 2009 |
| Replies: 2 Views: 227 THANK you! ...I always forget about that part |
Forum: C++ Feb 28th, 2009 |
| Replies: 2 Views: 227 bool operator>=(const ElementType &e1, const KeyType &key);
I am trying to overload >= which compares the a string in struct e1 with a string. When I compile I get an error that:
'bool... |
Forum: C++ Feb 10th, 2009 |
| Replies: 7 Views: 998 Ok classes seem to be working fine -- I'm posting them in case anyone runs into this kind of program. They all compile without any errors :D
player.h
#include <iostream>
#include <string>... |
Forum: C++ Feb 9th, 2009 |
| Replies: 7 Views: 998 tictactoe.h
class Tictactoe
{
private:
int s[9];
int row, col;
char square[3][3];
char board[3][3]; |
Forum: C++ Feb 9th, 2009 |
| Replies: 7 Views: 998 Thank you. I took your advice and made some changes, as well as added some:
(just putting the class files down for now since they are what I'm struggling with)
tictactoe.cpp
#include... |
Forum: C++ Feb 8th, 2009 |
| Replies: 7 Views: 998 Hey there. I am taking a programming class using C++ and my assignment is to create "Tictactoe" using ObjectOrientedProgramming... The problem is I have no idea what I am doing...
I need to have a... |