Oh, I did not realize it was deprecated. Thanks for the tip, I did quickly try the list<> and it worked!!
Type: Posts; User: wbeasl
Oh, I did not realize it was deprecated. Thanks for the tip, I did quickly try the list<> and it worked!!
I cannot seem to even get started using an ArrayList using Visual Studio 2005. The dot operator does not provide the methods explained in the book I have like "add", "clear", etc....
If I use...
I still got the same error but I did manage to get it to work from that suggestion. Changes in blue:
namespace sud
{
public partial class sud : Form
{
private Label[]...
Using C# 2005, I am trying to create labels at run-time using an array. The code below WITHOUT the array does work without run-time errors:
namespace sud
{
public partial class sud :...
Well, I cannot test it now but I will check on the first suggestion tonight and report back if it does not work, with the error message
I tried:
for (int x = 0; x < maxRooms; x++)
Delete room[x];
It will not even compile.
I have a created the following class instances of Doctor called "room" but I am not sure how to delete them, one at a time.
const short maxRooms = 6;
Doctor *room = new Doctor [maxRooms];
...
I am not sure how to find an element in a SET and report back that it was found. Using the code below, it always returns false.
Specialty.h
#include <set>
using namespace std;
class...
Okay, I thought since I could assign:
char *test = "Hello"; then I could input the same string. I thought there was a way to do this directly.
Is this the only way to do it?
char *test...
I am trying to make the first part below function correctly:
char *test;
cin >> test; // This does not work
char test2[25];
cin >> test2; // This seems to work
How do I input a char...
Yep, that was it. I forgot to include "using namespace std;" !!!
Actually, I wanted to have the deque definition within a simple class definition (TestClass.h) but the line of code does not seem to work here:
#include <deque>
class TestClass {
...
I have an array of stores with type class "manager" partially defined below:
private:
char* LastName;
char* Store;
char* Specialty;
Driver program creates:
No! It is not THE homework assignment. The assignment requires the building of a heap priority queue, which involves over 11 steps. The overload was a requirement for the queue. I asked about its...
An requires the use of an overloaded () operator for a comparator class.
1. Would someone explain the purpose and benefits for overloading the ()?
2. Please provide a code fragment that shows...
These crazy errors can be such a mystery. Anyway, it started working after I changed the following BAD CODE:
public:
StackClass<Elem> *Stack;
}; // end class Bag definition
I get and Unhandled Exception error when running the following code snippit below. It works without the nested class but I wanted the inplementation to be closer to the requirement specs. Only part...
The code works okay, but I wanted to find a way to simplify it for readability and ease of use.
I just typed the code as pseudocode but is there something that will do the following type of...
Is there a way to hide a class implementation from a driver?
I want to be able to have a driver file that can instantiate an object from CLASS A, but not be able to instantiate anything or access...
Is there an easier way to check the menu options without using the "option != "a" && "b" && ...."c".? Can I just check if character in string and simplify the if and while loops?
char...
Can you resubmit without the "I am silly" so that it will be easier to read?
Yes, the question stated to use the "string copy" (STRCPY) function to remove a word from a string. I though it was unusual.
On a previous test, one question specified that I was to use the STRCPY function to remove the word "Not" from the string:
char s [] = "This Is Not A Happy Day";
We were to use only a ONE line...
I figured it out and posted it. Thanks for checking.
I figured it out. It appears I was passing a reference to all three lists of the array using the "->" as in "list->", and then passing all three lists of the array as values in a parameter list:
...