Search:

Type: Posts; User: pollypocket4eva

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    1,078

    I'm creating an animation parameter system. An...

    I'm creating an animation parameter system. An animation can have parameters of different types: float, int, etc. I'd like to store all of an object's parameters in a single vector or map and allow...
  2. Replies
    11
    Views
    1,078

    Any thoughts? Thanks.

    Any thoughts? Thanks.
  3. Replies
    11
    Views
    1,078

    Why? Because I want to be able to manage a group...

    Why? Because I want to be able to manage a group of objects that have similar properties but contain different types of data within one compact vector. Am I missing something?
  4. Replies
    11
    Views
    1,078

    I want to be able to store a vector of objects...

    I want to be able to store a vector of objects where each object is of the same base class (and can therefore be inserted into the vector), but where each object (of various derived classes) would...
  5. Replies
    11
    Views
    1,078

    Hey, thanks, but that code doesn't work for me....

    Hey, thanks, but that code doesn't work for me.
    I'm getting "virtual cannot be specified on member function templates."
    Any ideas?
  6. Replies
    11
    Views
    1,078

    Templates and Inheritance

    Hi,
    I'm trying to do something like the following...
    I would like fill a vector with objects that are of different type variations of the same template base class.
    The code below of course does...
  7. Replies
    1
    Views
    1,047

    File Input error...

    I'm trying to read a file that uses 0xd7 and 0x0d as delimiters and the following code keeps failing:



    bool readFile(string FileName, vector<string>* FileOutput) {
    string ...
  8. Replies
    19
    Views
    5,612

    Hey, Thanks for your help. It turned out there...

    Hey,
    Thanks for your help.
    It turned out there was some stray line of code somewhere that was causing the problem.
    Got it now.
  9. Replies
    19
    Views
    5,612

    Hi, Here is what I'm using to do my callbacks....

    Hi,

    Here is what I'm using to do my callbacks. I've determined that (for a reason unknown to me) that when test() is called through the callback, it gives the wrong value. Can anyone see why this...
  10. Replies
    19
    Views
    5,612

    I'm not using a dll. This is on os x. //...

    I'm not using a dll. This is on os x.



    // WITHOUT CALLBACK EVENT
    $1 = {
    static npos = 4294967295,
    _M_dataplus = {
    <std::allocator<char>> = {
    <__gnu_cxx::new_allocator<char>>...
  11. Replies
    19
    Views
    5,612

    Oh, thanks. Here is what print name gives...

    Oh, thanks.

    Here is what print name gives back:



    // WITHOUT CALLBACK EVENT
    $1 = {
    static npos = 4294967295,
    _M_dataplus = {
  12. Replies
    19
    Views
    5,612

    Thanks again for your help. I believe the...

    Thanks again for your help.
    I believe the problem has to do with the string I'm passing to find() in the method getItem().
    Within my program, getItem() is often evoked during a callback event. It's...
  13. Replies
    19
    Views
    5,612

    Hey, Sorry, here is a more complete backtrace: ...

    Hey,
    Sorry, here is a more complete backtrace:



    #6 0x00012085 in GroupController::getInfo at GroupController.cpp:128
    NOTE: here is what the calling method looks like...
    void...
  14. Replies
    19
    Views
    5,612

    Hi, Thanks for your help. Here is the modified...

    Hi,
    Thanks for your help. Here is the modified code. Still produces the same problem.



    // Group.h
    #include "Item.h"

    typedef map<string, Item*> GroupMap;
  15. Replies
    19
    Views
    5,612

    Hey, Thanks. Unfortunately, that isn't the...

    Hey,
    Thanks.
    Unfortunately, that isn't the problem. I also tried find(name) and got the same results.
  16. Replies
    19
    Views
    5,612

    STL map problem

    What's wrong with this code? It seems to work fine most of the time, but I'm getting EXC_BAD_ACCESS on some occasions.

    Here is the debug stack:



    #4 0x00018016 in std::map<std::string,...
  17. Replies
    1
    Views
    1,000

    Char array and string

    Hi,
    I'm using the follow code in a socket connection function:


    char input[100];
    ssize_t n;
    while((n = read(sockfd, input, sizeof input)) > 0) {
    input[n] = '\0';
    }
  18. Replies
    4
    Views
    3,148

    Hey, Thanks for your help. I've just found my...

    Hey,
    Thanks for your help. I've just found my problem. Turns out the deque was actually fine all along. I thought I'd ruled out all other possible causes of the leak, but there was something I'd...
  19. Replies
    4
    Views
    3,148

    Well, MyType contains a lot of data, so I was...

    Well, MyType contains a lot of data, so I was reluctant to pass copies. I guess I can reconsider that a bit. I hadn't considered using shared_ptr as I don't feel I have a firm grasp on what that is....
  20. Replies
    4
    Views
    3,148

    deque memory leak

    Hi,
    I can't figure out why the following is leaking memory - when I run the application the memory usage just keeps going up. Anyone see something wrong with this code:

    I'm adding some initial...
  21. Replies
    18
    Views
    3,224

    So just to flesh it out (and don't worry, I'm not...

    So just to flesh it out (and don't worry, I'm not asking you to do my homework, I just want to understand the structure better and I'm not otherwise getting it:

    I have:


    struct aCoord {
    int...
  22. Replies
    18
    Views
    3,224

    Thanks. I see your point that every case is...

    Thanks. I see your point that every case is covered. But I guess I'm having a hard time wrapping my mind around how the operator is applied by find() and so the ordering has me confused. Sorry and...
  23. Replies
    18
    Views
    3,224

    Ok, but how can the < operator address my struct?...

    Ok, but how can the < operator address my struct? I need to test if first.a==second.a && first.b==second.b
    The following does not do that:



    bool operator<(const aCoord &other) const
    {...
  24. Replies
    18
    Views
    3,224

    Anyone?

    Anyone?
  25. Replies
    18
    Views
    3,224

    I've read that, but can't figure out how to apply...

    I've read that, but can't figure out how to apply it here.
    Would it be something like this?


    struct aCoord {
    int a,b;
    bool operator==(const aCoord &other) const
    { return (a ==...
Results 1 to 25 of 83
Page 1 of 4 1 2 3 4