Search:

Type: Posts; User: wbeasl

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    8,419

    Oh, I did not realize it was deprecated. Thanks...

    Oh, I did not realize it was deprecated. Thanks for the tip, I did quickly try the list<> and it worked!!
  2. Replies
    2
    Views
    8,419

    ArrayList Basics - Example

    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...
  3. Replies
    3
    Views
    4,583

    I still got the same error but I did manage to...

    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[]...
  4. Replies
    3
    Views
    4,583

    Array of Runtime Labels

    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 :...
  5. Replies
    6
    Views
    2,074

    Well, I cannot test it now but I will check on...

    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
  6. Replies
    6
    Views
    2,074

    I tried: for (int x = 0; x < maxRooms; x++)...

    I tried:


    for (int x = 0; x < maxRooms; x++)
    Delete room[x];

    It will not even compile.
  7. Replies
    6
    Views
    2,074

    Delete instance of a class array

    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];

    ...
  8. Replies
    3
    Views
    1,381

    Find element in SET container

    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...
  9. Replies
    5
    Views
    11,506

    Okay, I thought since I could assign: char...

    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...
  10. Replies
    5
    Views
    11,506

    Input a char pointer (*string)

    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...
  11. Replies
    8
    Views
    2,920

    Yep, that was it. I forgot to include "using...

    Yep, that was it. I forgot to include "using namespace std;" !!!
  12. Replies
    8
    Views
    2,920

    Deque with Class definition

    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 {
    ...
  13. Replies
    8
    Views
    2,920

    Using DEQUE within Class Definition

    I have an array of stores with type class "manager" partially defined below:


    private:
    char* LastName;
    char* Store;
    char* Specialty;


    Driver program creates:
  14. Replies
    9
    Views
    10,275

    No! It is not THE homework assignment. The...

    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...
  15. Replies
    9
    Views
    10,275

    OverLoading the "()" parentheses operator

    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...
  16. Replies
    3
    Views
    1,743

    Found it!

    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
  17. Replies
    3
    Views
    1,743

    Unhandled Exception (Vectors)

    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...
  18. Replies
    6
    Views
    1,624

    The code works okay, but I wanted to find a way...

    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...
  19. Replies
    5
    Views
    1,660

    Hide class implementation from driver?

    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...
  20. Replies
    6
    Views
    1,624

    Menu Options Verification?

    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...
  21. Thread: String Mess

    by wbeasl
    Replies
    9
    Views
    1,237

    Can you resubmit without the "I am silly" so that...

    Can you resubmit without the "I am silly" so that it will be easier to read?
  22. Replies
    3
    Views
    2,509

    Yes, the question stated to use the "string copy"...

    Yes, the question stated to use the "string copy" (STRCPY) function to remove a word from a string. I though it was unusual.
  23. Replies
    3
    Views
    2,509

    Using "STRCPY" to remove a word

    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...
  24. Replies
    3
    Views
    1,644

    I figured it out and posted it. Thanks for...

    I figured it out and posted it. Thanks for checking.
  25. Replies
    3
    Views
    1,644

    I figured it out. It appears I was passing a...

    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:
    ...
Results 1 to 25 of 36
Page 1 of 2 1 2