Search:

Type: Posts; User: GCNDoug

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    2,707

    Efficient Sorting Algorithm

    I am trying to come up with an efficient sorting algorithm to sort a set of values from 0 to 30,000. There are no duplicate numbers in the set, and I want to use as little memory requirements as...
  2. Replies
    14
    Views
    2,029

    Thanks for the help everyone!

    Thanks for the help everyone!
  3. Replies
    14
    Views
    2,029

    I worked the second part out and hopefully you...

    I worked the second part out and hopefully you guys can check me.

    L1.append(10);
    L1.append(20);
    L1.append(15);

    <| 10, 20, 15>

    L1.setStart(); - "Place fence at list start, making left...
  4. Replies
    14
    Views
    2,029

    Left partition Start W Edn X Right...

    Left partition

    Start W
    Edn X

    Right partiton

    Start Y
    End Z
  5. Replies
    14
    Views
    2,029

    This is for a data organization class. The fence...

    This is for a data organization class. The fence is '|' I had never heard of a fence until this programming class I thought maybe it was the current pointer I'm not sure. The right partition would...
  6. Replies
    14
    Views
    2,029

    Appending a list!

    Quick list question.

    If I have an empty list where would I append the first value of the list.

    The definition of append in the question says "append an element at the end of the right...
  7. Replies
    0
    Views
    7,445

    Josephus Problem

    I am have some trouble implementing my client code for this program could someone give me some ideas.

    This problem is an exercise in the implementation of queue. We will look at the...
  8. Replies
    8
    Views
    1,608

    Alright I'll see what I can do I'm trying to make...

    Alright I'll see what I can do I'm trying to make a program using recursion to set all of the lights to off (0) when they are initially set to on (1).
  9. Replies
    8
    Views
    1,608

    We have not got to vectors in class. I don't...

    We have not got to vectors in class. I don't know if I can use that I will play with it anyway thanks.
  10. Replies
    8
    Views
    1,608

    Arrary with user defined size

    void main()
    {

    const int size;
    cout << "Please enter a amount of lights" << endl;
    cin >> size;

    int lights[size];

    for (int i = 0; i < n; i++)
  11. Replies
    29
    Views
    2,521

    I am pretty sure that I tried it earlier with the...

    I am pretty sure that I tried it earlier with the () but I'm not sure will post results when I get a chance to compile again
  12. Replies
    29
    Views
    2,521

    already tried, if I take it out it still gives a...

    already tried, if I take it out it still gives a compiler error.


    case 1:
    sellProduct (productlist[0].returnname, counter);
    break;

    1>c:\users\doug\documents\visual studio...
  13. Replies
    29
    Views
    2,521

    Well after I fixed the class functions it says...

    Well after I fixed the class functions it says this for every line of the switch statement.

    1>c:\users\doug\documents\visual studio 2008\projects\lab5candy\lab5candy\candymachinelab.cpp(62) :...
  14. Replies
    29
    Views
    2,521

    I want the name lol! I fixed the class functions...

    I want the name lol! I fixed the class functions though. Will keep working on the other stuff thanks again for ur help!
    void sellProduct(dispenserType product[], cashRegister& pCounter);...
  15. Replies
    29
    Views
    2,521

    #include #include class...

    #include <string>
    #include <iostream>

    class dispenserType
    {
    public:
    int getNoOfItems() const;
    int getCost() const;
    void makeSale();
    dispenserType(int setNoOfItems = 50, int setCost...
  16. Replies
    29
    Views
    2,521

    Like this? #include #include...

    Like this?


    #include <string>
    #include <iostream>

    class dispenserType
    {
    public:
    int getNoOfItems() const;
  17. Replies
    29
    Views
    2,521

    That sounds awesome I would love to make all of...

    That sounds awesome I would love to make all of that information no longer private although I'm not sure that's what I'm suppose to do.

    I need to be able to access the information in the switch...
  18. Replies
    29
    Views
    2,521

    I guess i need to do all of the work that was...

    I guess i need to do all of the work that was originally done in main through the class functions now?

    Well I need to display all of the items with a number in order to select them. Then work...
  19. Replies
    29
    Views
    2,521

    Well now I have all the data, I just need to...

    Well now I have all the data, I just need to figure out now how to use it lol.
  20. Replies
    18
    Views
    1,921

    hmm appears to have compiled fine without the...

    hmm appears to have compiled fine without the #include statements but either way I added them. This issues is solved wooooo!

    Thanks guys!
  21. Replies
    29
    Views
    2,521

    So then how do I send the opened file to the...

    So then how do I send the opened file to the function?

    And once i send it will I be able to access all of those class objects anywhere?

    Change last two lines to this?


    for (int i = 0; i <...
  22. Replies
    18
    Views
    1,921

    oh sorry, that is totally new to me; have not...

    oh sorry, that is totally new to me; have not learned in class. Will try now! Thanks you rock! lol
  23. Replies
    29
    Views
    2,521

    Elysia does this look like the right set up for...

    Elysia does this look like the right set up for main in order to send the opened file?


    ifstream inStud;
    dispenserType productlist[8];


    inStud.open("items.txt");
    if (!inStud)
    {
  24. Replies
    18
    Views
    1,921

    still no luck. std::ifstream // or...

    still no luck.


    std::ifstream // or std::ifstream;
    std::string // or std::string;
    class dispenserType
    {
    public:
    int getNoOfItems() const;
    int getCost() const;
  25. Replies
    18
    Views
    1,921

    #include #include class...

    #include <string>
    #include <fstream>
    class dispenserType
    {
    public:
    int getNoOfItems() const;
    int getCost() const;
    void makeSale();
    dispenserType(int setNoOfItems = 50, int setCost =...
Results 1 to 25 of 134
Page 1 of 6 1 2 3 4