Search:

Type: Posts; User: mmfuller

Search: Search took 0.00 seconds.

  1. Sebastiani, Thank you. You posted your initial...

    Sebastiani,
    Thank you. You posted your initial reply at almost the same moment that I posted my reply to Dino. My reply was not a response to your post.

    Your advice was very helpful. I did not...
  2. Calling rand() with the same seed will produce...

    Calling rand() with the same seed will produce the same value. Perhaps I should have stated my question better: why is the value of srand not changing when I give it different values of time?
  3. rand() seeded with time but values don't change

    I've used the system time to seed the std random number generator in the past, but for some reason now it is not working. This is on a Mac running OS 10.6.1, compiling with gcc 4.2.1.



    #include...
  4. Replies
    3
    Views
    6,125

    Yes, using (*p) fixed it. Thank you!! Mike

    Yes, using (*p) fixed it. Thank you!!
    Mike
  5. Replies
    3
    Views
    6,125

    whoops, data should have been C2v! Mistake in cut...

    whoops, data should have been C2v! Mistake in cut and paste!
    Mike
  6. Replies
    3
    Views
    6,125

    dereferencing vector iterators

    I want to dereference a vector iterator that points to a vector of class objects whose members are pointers. I'm using a compound class (class 1) whose members are pointers to another class (class...
  7. Replies
    12
    Views
    1,724

    Thanks for the recommendation. Like many in...

    Thanks for the recommendation.

    Like many in the life sciences, I've had one semester in C++ and the rest of my education has come from reading, working with other scientists, and working in the...
  8. Replies
    12
    Views
    1,724

    Have you certain books you'd like to recommend?...

    Have you certain books you'd like to recommend? I've been reading the following:

    Effective C++, 3rd edition, by Scott Meyers (2005)
    C++ Cookbook, by D.R. Stephens, C. Diggins, J. Turkanis, and J....
  9. Replies
    12
    Views
    1,724

    Okay, thanks for everyone's advice! Mike

    Okay, thanks for everyone's advice!
    Mike
  10. Replies
    12
    Views
    1,724

    Okay, I see what you mean. What if data were a...

    Okay, I see what you mean. What if data were a member of a class? Would I need to explicitly destroy it within the class destructor? For example, would I need to include a call to the vector...
  11. Replies
    12
    Views
    1,724

    vector destruction and malloc

    I'm learning how to code with vectors. I wrote a few lines to try out the vector destructor. I thought it was simple enough, but the code generates a runtime error that refers to memory allocation....
  12. Ahhh, I see now! Thank you. I just joined this...

    Ahhh, I see now! Thank you. I just joined this group. It seems very active and helpful! :)
  13. Good idea! I'm just learning to use the STL. One...

    Good idea! I'm just learning to use the STL. One thing I don't understand: why do I need to pass a vector of pointers by reference, but I don't need to pass an array of pointers by reference? For...
  14. The vector (which will actually hold class...

    The vector (which will actually hold class objects, not ints as in my example) must hold a large data set, which is then processed to extract a much smaller subset. Once the subset has been extracted...
  15. Thanks for you help!

    Thanks for you help!
  16. Do you mean, the function should be like this? ...

    Do you mean, the function should be like this?



    void fillvec(vector<int*>& v)
  17. vector of pointers and assignment within function

    I'm having trouble using a function call to assign values to an empty vector of pointers. I can use a function to assign values to an ordinary array of pointers, but when I try to do the same using a...
Results 1 to 17 of 17