Search:

Type: Posts; User: misterMatt

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    7,441

    This seemed to work template...

    This seemed to work


    template<typename T>
    list<T> listIntersection(const list<T>& L1, const list<T>& L2)

    //list to return
    list<T> temp;
    //iterators
    list<T>::const_iterator L1itr =...
  2. Replies
    6
    Views
    7,441

    I can see that after L1itr, and L2itr both hit...

    I can see that after L1itr, and L2itr both hit 5(original data), that L2itr++ is done twice. Instead of it being just 6, it jumps to 10 because it's meeting that second condition - but even then in...
  3. Replies
    6
    Views
    7,441

    Ahh yeah. That would be the first issue. :D ...

    Ahh yeah. That would be the first issue. :D


    while(L1itr != L1.end() || L2itr != L2.end()){ } would be the correct one
  4. Replies
    6
    Views
    7,441

    intersection of two STL lists

    Hi guys, this is a homework assignment. Right now, I'm thinking that my solution should probably work - but of course it doesn't and I cant spot the problem. I was hoping one of you would be kind...
  5. Replies
    0
    Views
    2,425

    Josephus problem variant logic troubles

    I'm supposed to implement a variant of the josephus problem for my C++ class using an STL list. I've got it pretty much half working but there is a logic oversight that I'm making and I keep getting...
  6. Replies
    3
    Views
    10,715

    Music Visualization

    I'm interested in learning a little about music visualization. Google turned up nothing of any use on the subject as far as I could tell.

    Anyway, what I'm talking about is a graphical display of...
  7. Replies
    113
    Views
    19,467

    Should I rephrase? In what context would...

    Should I rephrase? In what context would representing an RGB+alpha value as a float be useful?

    A memory saving device perhaps?
  8. Replies
    113
    Views
    19,467

    Why would you want to do this?

    Why would you want to do this?
  9. Replies
    10
    Views
    1,272

    What this person is saying - in a nutshell, is...

    What this person is saying - in a nutshell, is that functions generally have what are called 'declarations' at the top of the file to let the compiler know a little about the function - most...
  10. I'm confused. It still fails compilation for me.

    I'm confused. It still fails compilation for me.
  11. yes I do, at the top of my file: double...

    yes I do, at the top of my file:



    double velocity_x(int vel, int degrees);
    double velocity_y(int vel, int degrees);
    double delta_x(double vel_x, double time);
    double delta_y(double vel_y,...
  12. error C2064: term does not evaluate to a function taking 2 arguments

    Hey guys, I'm trying to create a little program here, but I'm having some trouble with it.

    I'm getting the following error message: error C2064: term does not evaluate to a function taking 2...
  13. Replies
    4
    Views
    16,063

    A quick question about the above, however. The...

    A quick question about the above, however. The book I'm working through suggested I implement the function to learn about recursion. The book also stated that this is a popular demonstration of...
  14. Replies
    4
    Views
    16,063

    My mistake on the missing return bit. I'm not...

    My mistake on the missing return bit. I'm not sure why I overlooked that... Anyway, I've updated the conditions of the second else if - they should now properly match the wikipedia entry.

    ...
  15. Replies
    4
    Views
    16,063

    ackermann function

    Is my implementation correct? I'm assuming it's not because I keep getting zero returned... Where am I going wrong?


    //implementation of the recursive ackermann function
    int ack(int m, int n)
    {...
  16. Replies
    16
    Views
    2,529

    you do perform an operation where you are mixing...

    you do perform an operation where you are mixing variable types. could that be the cause of precision loss?
  17. What does the ampersand (&) represent when used...

    What does the ampersand (&) represent when used next to the string declaration and the setName() function parameter?
  18. Thread: 1=0.

    by misterMatt
    Replies
    61
    Views
    17,358

    What about the whole .999... = 1 'proof'? ...

    What about the whole .999... = 1 'proof'?

    http://en.wikipedia.org/wiki/0.999...
  19. I used the Pythagorean theorem as an example. Of...

    I used the Pythagorean theorem as an example. Of course, trig identities were never fully explained to us either.

    Unfortunately where I went to high school, most teachers weren't preparded to...
  20. Replies
    16
    Views
    2,529

    It worked for me as well. Of course, your output...

    It worked for me as well. Of course, your output is wonky if you enter a value that doesn't have a fractional part to it...
  21. Unfortunately, the public education system here...

    Unfortunately, the public education system here in the states completely ignores proofs entirely. So whatever the kiddies learn in math class - they won't understand why it works how it works.
    ...
  22. Replies
    6
    Views
    6,857

    I thought Mass Effect was a little short to be...

    I thought Mass Effect was a little short to be honest. The whole thing seemed a bit rushed is all.

    The PC has a lot of awesome looking games on the horizon.

    I have to say, I've been pretty...
  23. Try this:...

    Try this: http://pixwiki.bafsoft.com/mags/5/articles/circle/sincos.htm
  24. Replies
    25
    Views
    2,860

    Relax guys, it's not for school. I'm reading...

    Relax guys, it's not for school. I'm reading Beginning ANSI C++ by Horton and trying to keep up.

    In the book, he mentions that making use of the string class is preferable over the use of a char...
  25. Replies
    25
    Views
    2,860

    That sort of defeats the purpose of the exercise...

    That sort of defeats the purpose of the exercise though doesn't it?
Results 1 to 25 of 32
Page 1 of 2 1 2