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

Search:

Type: Posts; User: cloud125

Search: Search took 0.03 seconds.

  1. Replies
    4
    Views
    1,335

    Re: Sorting a vector alphabetically?

    The file has the different attributes of a Movie, such as title, director, year and I just need to sort it alphabetically by its title. How would I do that?
  2. Replies
    4
    Views
    1,335

    Sorting a vector alphabetically?

    I am reading a file and storing the data (all strings) into a vector. How would I sort this alphabetically?
  3. Replies
    10
    Views
    2,164

    Re: Creating a Grid?

    Thank you! I did not know they had that, but I should have known since they have everything over the internet.
  4. Replies
    10
    Views
    2,164

    Re: Creating a Grid?

    oh, thank you.
    I was also wondering, do classes always have to be in a header file or can it be in the .cpp file? I thought it always had to be in the header and you just call it from your main file.
  5. Replies
    10
    Views
    2,164

    Re: Creating a Grid?

    Sorry, a lot of times I am not on a computer that has my Visual Studio program on it so I am writing code out on a notepad. Thank you for the partial class definition,
  6. Replies
    10
    Views
    2,164

    Re: Creating a Grid?

    Would this work for my grid class?


    #ifndef _Grid_
    #define _Grid_

    class Grid
    {
    vector<vector<int> > matrix;
    int width,height;
  7. Replies
    10
    Views
    2,164

    Creating a Grid?

    Thanks for the help
  8. Replies
    2
    Views
    3,133

    Loops and Vectors

    How would I make a loop that would simultaneously compute both the max and min of a vector?
  9. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Re: Homework Help

    Okay thank you, that helps a lot ^^
    When I put enum as the type, it says it is not allowed


    cout << "Enter movie rating: ";
    enum myRating;
    cin >> myRating;
    myMovie.setRating(myRating);
  10. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Re: Homework Help

    Sorry, I am kind of a beginner with programming so I am a little confused with how to write methods and such.
  11. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Re: Homework Help

    Okay so I am stuck again....
    Is this part of the code supposed to go under the main function? Or do I just call it somehow in the main?

    void promptForMovie(Movie& myMovie)
    {
    cout << "Enter...
  12. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Re: Homework Help

    Thanks so much! This helps a lot. I will work on it right now using this information; if I have any more questions I'll be sure to ask. ^^
  13. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Re: Homework Help

    Okay, thank you for your help!
  14. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Re: Homework Help

    Is there a way to edit my post or delete it so I can fix it?
  15. Thread: Homework Help

    by cloud125
    Replies
    12
    Views
    10,815

    Homework Help

    Hello, I was working on my C++ homework and was wondering if anyone could help me with part of it. I wrote the .cpp and .h files but now I am stuck. Here is what I am supposed to do:

    1. Write a...
Results 1 to 15 of 15





Click Here to Expand Forum to Full Width

Featured