Search:

Type: Posts; User: jocdrew21

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    6
    Views
    645

    You are on a c++ forum, that kind of lack at...

    You are on a c++ forum, that kind of lack at attention to detail makes me wonder about you.

    I am a Java Developer and if you post to https://jsfiddle.net/ I will help you out.

    What is up with...
  2. Sorry I am not at my computer/compiler at the...

    Sorry I am not at my computer/compiler at the moment but I would like to thank you for the replies. @ Elysia you mentioned Lamda's. How would I accomplish this code in a Lamda? I am asking because I...
  3. Threads giving the following error: call of an object of a class type without appropr

    I made a simple binary tree then decide to try out threads too. I got the following error:

    call of an object of a class type without appropriate operator or conversion



    #include "Tree.h"...
  4. I was not sure if he was trying to access private...

    I was not sure if he was trying to access private members. ie if there was a private variable in one of his functions what was suppose to return it value. The cpp file was not posted but I knew...
  5. Program( CompactDisk disk); When you...

    Program( CompactDisk disk);



    When you create a new compactDisk into Program in main it is aware of the fields of compactDisk
  6. Ok before I am attacked by someone whom is more...

    Ok before I am attacked by someone whom is more refreshed on C++ then I am I just I been using C# and Java ALOT and very little C++. If you do not use it you loose it but this seems to be a very good...
  7. Replies
    13
    Views
    1,282

    I handled that in the print function. Just to...

    I handled that in the print function. Just to make sure I did what you said and I got an out of 2 for Alex when I know it is 1. I get one when way I have written it below:



    void...
  8. Replies
    13
    Views
    1,282

    Got it to work!!! Thank you Elysia.... ...

    Got it to work!!! Thank you Elysia....



    #include "WordCount.h"




    WordCount::WordCount()
  9. Replies
    13
    Views
    1,282

    It is not working but this is what I have. If...

    It is not working but this is what I have. If this what you were referring too. I am taking your advice, or at least attempting to. I am going to try the map<string,int> myMap approach after I get...
  10. Replies
    13
    Views
    1,282

    You're right... I used the Word object...

    You're right...



    I used the Word object because I was thinking the collisions would cause an issue. Meaning "Mike" and "Mike" have the same key and the countOccurrence function in the Word...
  11. Replies
    13
    Views
    1,282

    Ahhhh..... Don't I look silly..... This what I...

    Ahhhh..... Don't I look silly.....

    This what I am trying to do:

    1) Get occurrence of a word in a sentence, and count how many times that word occurred. For example if you were writing a ransom...
  12. Replies
    13
    Views
    1,282

    adding objects to a unordered map:

    I am trying to solve some random puzzles so I do not lose/forget c++. I never used hashtables in C++ and decided I needed to brush up. I am having in creating a hashmap that holds objects with a...
  13. Have you learn recursion yet? This would be a...

    Have you learn recursion yet? This would be a great problem for that!!!!

    If you have not learned that yet get a piece of paper and write down what is happening in the loop or use breaks in your...
  14. Replies
    8
    Views
    590

    I am still working two issues, one is it is...

    I am still working two issues, one is it is sorting the licensePlates together now but not in the order I would like here is an example of what the output is:


    315630 4 21 17 34.\
    315630 2 21 16...
  15. Replies
    8
    Views
    590

    struct{ inline bool operator()...

    struct{

    inline bool operator() (Vehicle v1, Vehicle v2)
    {
    //return v1.getLicensePlate().compare(v2.getLicensePlate());
    return v1.getLicensePlate() <...
  16. Replies
    8
    Views
    590

    Thank you for the replies and the reminder of...

    Thank you for the replies and the reminder of pass by value vs. reference, I have since fixed the issue.



    struct{

    inline bool operator() (Vehicle v1, Vehicle v2)
    {
    ...
  17. Replies
    8
    Views
    590

    Since no one has responded yet I still need a...

    Since no one has responded yet I still need a little advice. The above is sorting the times, not the string of license plates. Another thing that makes me believe I mishandled this is that it take...
  18. Replies
    8
    Views
    590

    I got it..... I really want to take this post...

    I got it..... I really want to take this post down but for the sake of others learning I will post the answer:

    That is how you compare objects in a class using the sort function.


    struct{
    ...
  19. Replies
    8
    Views
    590

    Comparing Objects:

    I have a class that has a few variables and getters / setters. I set these variables and then place the node into a vector.



    vehicle.setLicensePlate(plate);
    ...
  20. Replies
    14
    Views
    760

    I agree, I already created this program in java...

    I agree, I already created this program in java and used the following. The junk data was handled before this but you brought some unique light on how to handle that.



    String line,time,plates;...
  21. Replies
    4
    Views
    614

    This would be a prefect job for a hashtable.

    This would be a prefect job for a hashtable.
  22. Replies
    14
    Views
    760

    Jim.. Thank you, your way was a lot faster...

    Jim..

    Thank you, your way was a lot faster than my method of choice and easier to read! That example just changed how I will treat unwanted data in a file forever.
  23. Replies
    14
    Views
    760

    The file has 72,000 vehicles, and 5 cameras. I...

    The file has 72,000 vehicles, and 5 cameras. I just have to calculate the distance it traveled in seconds and convert it to MPH or KPH.


    I will simplify the readFile, I was just debugging...

    ...
  24. Replies
    14
    Views
    760

    I did that because I assumed no one would want to...

    I did that because I assumed no one would want to compile the code, I just showed the important code that pertains to the question. I thought I would annoy you guys by posting an entire program...
  25. Replies
    14
    Views
    760

    Did I make you guys mad?

    Did I make you guys mad?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4