Search:

Type: Posts; User: scarecrow

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    3,237

    Linker typeinfo error

    I have an odd linker error compiling with Clang.

    I'm actually trying to build a clang tool and I am linking against a freshly built set of clang libraries which I can verify do indeed have the...
  2. Replies
    3
    Views
    994

    [edit]: I solved this - my test was broken and...

    [edit]: I solved this - my test was broken and you were correct in your assertion about free store and static initialisation values. Thanks!
  3. Replies
    3
    Views
    994

    Can you tell me where to find this within the ISO...

    Can you tell me where to find this within the ISO standard?

    The definition is within a class member function in this particular case. I do understand how to correctly initialise it, and I always...
  4. Replies
    3
    Views
    994

    Uninitialised char[N]

    Hi,

    After coming across some dubiously safe code I've been scanning the C++ standard but cannot find any definitive reference to what the value of an uninitialised char[N] will be. Is it...
  5. Replies
    17
    Views
    2,719

    That is how I have done it in the past - just...

    That is how I have done it in the past - just wanted to see if there was perhaps another trick.
    Great.

    Thanks for all the help guys. It seems to be working great.
  6. Replies
    17
    Views
    2,719

    Interesting. Curious about your line and file...

    Interesting. Curious about your line and file parameters there - assuming you were to use __FILE__ and __LINE__, would this mean every time you wanted to allocate some memory you'd have to type that...
  7. Replies
    7
    Views
    1,471

    Well that becomes a problem also - you will need...

    Well that becomes a problem also - you will need to integrate with a users browser to set cookies and such. So unless you want to only use your own browser, you'll have to learn to do this for every...
  8. Replies
    17
    Views
    2,719

    And suddenly I realise how simple and stupid my...

    And suddenly I realise how simple and stupid my problem actually was. Thanks for some perspective.

    So would I always allocate exactly 16 bytes? Or should I weight this to increase more (in...
  9. Replies
    7
    Views
    1,471

    Unless you're planning to use some browser fault...

    Unless you're planning to use some browser fault to inject and run code on the client platform this is certainly not a C++ problem.. And if you did want to do that, it'd hardly be ethical to show you...
  10. Replies
    17
    Views
    2,719

    Well yes, that's a given. But how can I determine...

    Well yes, that's a given. But how can I determine how much is in fact deallocated?
  11. Replies
    17
    Views
    2,719

    I'm actually not really worried about memory...

    I'm actually not really worried about memory leaks, I'm quite cautious when writing my code - however I like the idea of tracking a leak detector - for curiosity's sake if anything.

    If it is...
  12. Replies
    17
    Views
    2,719

    Memory deallocated.

    Is there an easy way to determine how much memory an object is allocated? If I overload delete on an object, from which other objects are inherited - can keep track of how much memory is deallocated...
  13. Replies
    16
    Views
    2,759

    Well it's a variable. You're getting a...

    Well it's a variable.

    You're getting a segfault because you're going out of bounds of your array.



    Agreed.

    To visualise your problem, let's assume I passed in 2 file names, file.a and...
  14. Thread: Class Help

    by scarecrow
    Replies
    11
    Views
    1,877

    Can you post the actual console output? Also,...

    Can you post the actual console output?
    Also, define "doesn't run anymore"...
  15. Thread: Class Help

    by scarecrow
    Replies
    11
    Views
    1,877

    Shouldn't you have received an undefined ref. to...

    Shouldn't you have received an undefined ref. to regrowth??
  16. Thread: Class Help

    by scarecrow
    Replies
    11
    Views
    1,877

    Was the class specifier lost in translation, or...

    Was the class specifier lost in translation, or is your code actually this way (sans forest:: ):


    int forest::regrowth(double growProb)
    {
    double rannum;
    ...
  17. Thread: Class Help

    by scarecrow
    Replies
    11
    Views
    1,877

    Where do you define grid? (ps; is regrowth...

    Where do you define grid? (ps; is regrowth supposed to be a member of forest?)
  18. Replies
    0
    Views
    941

    pthread object

    I have attempted to create a simple object that represents a thread and wraps around the pthread API to execute itself. I'm having a bit of trouble though.

    If I inherit the object and reimplement...
  19. Actually I have rewritten it to return const T&,...

    Actually I have rewritten it to return const T&, because it avoids problems in tracking data size of elements stored internally for one.

    Thanks for the heads up on the potential IDE problems - I...
  20. I see - so there's no RTTI involved with...

    I see - so there's no RTTI involved with templates and an actual function matching the types I'm passing is created at compile time which all subsequent calls are then pointed to? So I only have to...
  21. Undefined reference - however they ARE defined

    I'm having an odd problem with my code. I have a template function in my class.
    This is in the header file lcmp.h as so:


    class LCMPMsg{
    public:
    ...
    template <class T> T*...
Results 1 to 21 of 21