Search:

Type: Posts; User: Todd88

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    61
    Views
    6,921

    Could you maybe alter it a bit so it takes in my...

    Could you maybe alter it a bit so it takes in my parameters? That would be a perfect solution to my problem.
  2. Replies
    61
    Views
    6,921

    Wow that's perfect. Don't really have a clue...

    Wow that's perfect. Don't really have a clue about how it works though. :( Would be perfect for this project though.
  3. Replies
    61
    Views
    6,921

    I'm sure it is a waste of time but I haven't...

    I'm sure it is a waste of time but I haven't learned maps yet :(
  4. Replies
    61
    Views
    6,921

    Oh wait no. That is what it does now which is...

    Oh wait no. That is what it does now which is bad. Sorry, didn't read it close enough. Trying to get rid of that. It prints out like 100 of the same string. I am trying to fix it by doing a binary...
  5. Replies
    61
    Views
    6,921

    That's exactly what is SHOULD do :D

    That's exactly what is SHOULD do :D
  6. Replies
    61
    Views
    6,921

    No there is no error. It just doesn't add to the...

    No there is no error. It just doesn't add to the vector correctly.
  7. Replies
    61
    Views
    6,921

    Okay why can't I do this: void...

    Okay why can't I do this:


    void Index::addWord(string word, int pageNumber)
    {
    if(word.length() > 3)
    {
    indexWord index;
    for (vector<indexWord>::iterator...
  8. Replies
    61
    Views
    6,921

    and the binary_search algorithm should work too...

    and the binary_search algorithm should work too correct? It does work for me though.


    binary_search (data.begin(), data.end(), word)

    right?
  9. Replies
    61
    Views
    6,921

    I overloaded the operator < using: bool...

    I overloaded the operator < using:


    bool indexWord::operator< (indexWord& string)
    {
    return value < string.value;
    }

    It's still telling me that there is no match for operator <
  10. Replies
    61
    Views
    6,921

    This still sorts the characters of the string...

    This still sorts the characters of the string value instead of sorting the "data" vector by the string value.
  11. Replies
    61
    Views
    6,921

    So this should work right? void...

    So this should work right?


    void Index::addWord(string word, int pageNumber)
    {
    indexWord index;
    if(word.length() > 3)
    {
    index.value = word;
    ...
  12. Replies
    61
    Views
    6,921

    I need to order if first before using...

    I need to order if first before using lower_bound(). I need to order it by the string word.
  13. Replies
    61
    Views
    6,921

    Alright I just need an addInOrder and...

    Alright I just need an addInOrder and binarySearch algorithm for the index vector. That's it and I'm done!!! But yet again...I'm lost.
  14. Replies
    61
    Views
    6,921

    The pages vector is inside the struct indexWord...

    The pages vector is inside the struct indexWord and the indexWord vector is inside the class Index though. I am really sorry but I just don't get it! I am sure this is simple stuff but I don't get...
  15. Replies
    61
    Views
    6,921

    I don't know how to search through the vector of...

    I don't know how to search through the vector of a vector and a string. I also don't know how to output the vector containing the page numbers that's in the vector.
  16. Replies
    61
    Views
    6,921

    I have a condition in my addWord function that...

    I have a condition in my addWord function that doesn't add the words if they are 3 letters or less. Plus this sounds really complicated sorting the vector even though I need to. How do I do this? I...
  17. Replies
    61
    Views
    6,921

    Alright I finally got it working. Now how to I...

    Alright I finally got it working. Now how to I look through the vector and output it according to first word?
  18. Replies
    61
    Views
    6,921

    Why is this not getting every single line of the...

    Why is this not getting every single line of the book, the page number, and storing it in the vector?? This is the driver file that runs through the file, gets the line, strips the line into words,...
  19. Replies
    61
    Views
    6,921

    Alright I got it working. Now how to a output...

    Alright I got it working. Now how to a output these values in the array according to their first letter?
  20. Replies
    61
    Views
    6,921

    nothing right now. just trying to see if that...

    nothing right now. just trying to see if that line of code works and it spit out that error.
  21. Replies
    61
    Views
    6,921

    data is the vector...

    data is the vector...
  22. Replies
    61
    Views
    6,921

    What tabstop just gave me: for...

    What tabstop just gave me:


    for (vector<indexWord>::iterator current=data.begin(); current!=data.end(); ++current)
  23. Replies
    61
    Views
    6,921

    invalid conversion from `const indexWord* const'...

    invalid conversion from `const indexWord* const' to `indexWord*'|
    ||=== Build finished: 1 errors, 0 warnings ===|
  24. Replies
    61
    Views
    6,921

    Yeah I need to loop through the data vector to...

    Yeah I need to loop through the data vector to output the "value" and vector of locations using the data vector. I don't know how to do this.
  25. Replies
    61
    Views
    6,921

    Vector of a struct containing another vector

    Okay I am implementing an index of words from an input text file. I have a class that contains a vector declared like this:


    vector<indexWord> data;

    and a struct declared like this:

    ...
Results 1 to 25 of 122
Page 1 of 5 1 2 3 4