Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by abcd12344445555

  1. abcd12344445555

    Possible memory leak

    Sorry, but what do you mean by "Class std::string has value semantics"?
  2. abcd12344445555

    Possible memory leak

    It seems to me that you have a C background. Right? That's why you feel uneasy about this approach. It is strange indeed. Thanks for the answer.
  3. abcd12344445555

    Possible memory leak

    In the following class I'm using the C lib <time.h> . The functions gmtime, ctime, and asctime return pointers to char/structs. Am I responsible to clean the memory allocated by them? Is there any possible memory leak associated to the methods MyTimeClass::getDateAndTimeLocalTime() and...
  4. abcd12344445555

    RFC 3014 - Notification log mib

    There are 4 tables defined in this MIB: - Config Table: which holds configurations profiles for named Logs. -Stats table : which holds statistical data for each named log. -Log table: which holds the actual log entries for each named log. - LogVariableTable: which keeps track of log table...
  5. abcd12344445555

    Inject data into a struct

    Thanks Scott, but that’s the point. I can’t change things like that. Unfortunately this is a legacy code and I need to figure out a way to use those structures as they are. Would be very nice to have u_int8_t *data instead of u_int8_t data[MAX_DATA_SIZE]. Best Regards, P.
  6. abcd12344445555

    Inject data into a struct

    I’ve got an equipment that receives some data from the network and map it to the structures below: struct a_s{ u_int16_t cmd; u_int16_t dataSize; u_int8_t data[MAX_DATA_SIZE]; }; typedef struct a_s a_t; struct b_s { u_int16_t part; u_int16_t serial; a_t payload; }; typedef struct...
  7. abcd12344445555

    set a vector inside a struc to NULL

    That wouldn't cause some memory leak? Since it's automatically allocated a chunk of memory of u_int8t * MAX_DATA_SIZE bytes?
  8. abcd12344445555

    code error?

    Here is an excerpt from one tutorial on how to compare float numbers in C: "(...) It is very usual for the C programming language beginners to compare a floating point number using the "==" operator. Floating point numbers must not be compared with the "==" operator. That is mainly because...
  9. abcd12344445555

    set a vector inside a struc to NULL

    Given the following scenario: struct a_s{ u_int16_t cmd; u_int16_t dataSize; u_int8_t data[MAX_DATA_SIZE]; }; typedef struct a_s a_t; struct b_s { u_int16_t part; u_int16_t serial; a_t payload; }; typedef struct b_s b_t; (...) b_t message; how can I set...
  10. abcd12344445555

    Calling methods that doesnt belong to the superclass

    class Parent { public: virtual void functionA() = 0; virtual void functionB() = 0; }; class SonA : public Parent { public: //implements virtual methods void functionA(); //... void functionB(); //... //SonA's exclusive method void exclusiveMethodSonA(); }; class SonB ...
  11. abcd12344445555

    Function definition with multiple '( )'

    Thanks for the reply. It turned out that the 'func(pu)' was actually a macro. Regards.
  12. abcd12344445555

    Function definition with multiple '( )'

    Hi, Is that a function definition? Why there are 2 sets of '()' in the definition and in the call? What's the name of this kind of definition? Definition: static inline void func(pu) ( void ) { printf( "%s", s_msg_usage ); } Call: func(pu)(); Thanks.
  13. abcd12344445555

    Why pointer is still NULL after function calling?

    In the following code why does the pointer head is still null after function calling? Thanks. #include <stdio.h> #include <stdlib.h> struct list_element{ int info; struct list_element * next; }; typedef struct list_element item; void alloc(item *head){ printf("%p\n"...
  14. abcd12344445555

    drawing b-tree on canvas (multiway tree)

    Does anyone have a algorithm for drawing a b-tree (a multiway tree, not a binary tree) on the canvas? I'm having a really hard time trying to do that! Thanks, Best regards, Paul.
  15. abcd12344445555

    link lib file

    C++ Builder 2007

Part and Inventory Search

Back
Top