CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Lang

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    596

    Unique variables in derived classes

    Hey there,

    I have a class derived from another with a variable that is defined in the derived class but not in the base class.

    I can set this variable in the constructor of the derived class...
  2. Replies
    9
    Views
    9,476

    Re: Shuffling an array

    using random_shuffle() I always get the same shuffled array returned.
  3. Replies
    9
    Views
    9,476

    Shuffling an array

    I have created a function that is supposed to shuffle the values in an array, I am having issues though - it doesn't seem to shuffle very well and I'm looking for some insight about how to go about...
  4. Replies
    5
    Views
    806

    Class Inheritance Question

    Hey there,

    Just a quick question about class inheritance:

    If I have a class C that inherits from both class A and class B.

    Class A and class B have a virtual function called foo()

    To...
  5. Replies
    5
    Views
    6,172

    Re: Issues overloading [] operator

    EDIT: Ok I figured it out - I called (*poly2)[1] -- now all that remains is how to fix my class so that calling poly[2] works correctly

    Ok, here is class Polynomial with all 3 of its constructors....
  6. Replies
    5
    Views
    6,172

    Re: Issues overloading [] operator

    Polynomial is a class I have created.

    Thanks for the links! I'm sure they'll be helpful.

    Polynomial is represented by an array of integers in variable coeff - when someone calls...
  7. Replies
    5
    Views
    6,172

    Issues overloading [] operator

    Hey guys,

    I can't seem to get the declaration for overloading the [] operator correctly.



    friend const int& operator[] (unsigned int argInt);
  8. Replies
    10
    Views
    1,385

    Re: Access Violation with helper functions

    Yes, I tried that and it worked.

    Thanks for the help everone.
  9. Replies
    10
    Views
    1,385

    Re: Access Violation with helper functions

    Thanks for the help guys!

    parking_spots[i] was not NULL but it was an invalid pointer. Is there anyway to detect that? Or should I just set every value in my parking_spots array to NULL?
    ...
  10. Replies
    10
    Views
    1,385

    Re: Access Violation with helper functions

    Ok, thanks for the quick reply. GCDEF asked for more code so this is class Car.



    //We fordward reference the parkingLot class because Class Car has yet to be defined
    //but our parkingLot class...
  11. Replies
    10
    Views
    1,385

    Access Violation with helper functions

    I have class A trying to access helper functions in class B.

    class A has a friend class B declaration and vice verse.

    However when class B tries to use the helper function I get an access...
  12. Replies
    3
    Views
    7,799

    Re: Class heirarchy help (classes using eachother)

    Cheers!
  13. Replies
    3
    Views
    7,799

    [RESOLVED] Class heirarchy help (classes using eachother)

    Heya!

    I have Class A that uses a variable of Class B and Class B uses a variable of Class A

    I'm having issues on how to include them in such a way that I don't get errors. I tried using


    ...
  14. Replies
    2
    Views
    887

    Access Violation Error with cstring

    My declaration:


    char * tempToken;
    tempToken = "";


    What's giving the error:
  15. Re: std::cin.getline() space and new line setting input

    One of the requirements is that all the numbers for each equation are on the same line.
  16. std::cin.getline() space and new line setting input

    Hey there.

    What I'm trying to accomplish is simply. A user enters the input '2 1 3 18' (not including the quotes)
    and all 4 numbers are put into an array.

    This is my code thus far (note...
Results 1 to 16 of 16





Click Here to Expand Forum to Full Width

Featured