Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: sandodo

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    431

    Protoype Design Pattern Link Issue

    Hi All,

    I am using the prototype design pattern to design a static library in linux.

    the class architecture looks like below:


    //Product.h
    class Product
    {
  2. Re: multiple writers and single read FIFO queue performance

    thanks! :wave:

    sandodo
  3. Re: multiple writers and single read FIFO queue performance

    end to end is to mean that the message received at incoming socket to broadcasted to outgoing socket.

    and our test model simulate the existing way of using queue. however, of course, we donot...
  4. Re: multiple writers and single read FIFO queue performance

    thanks for your replies.

    currently the throughput of one message end to end is about 50 micro-seconds, two queues (input_q and outgoing_q) take more than 10 micro-seconds out of the 50...
  5. Re: multiple writers and single read FIFO queue performance

    we are using this queue for trading platform's backend server.
    the queue itself will cost about 6 micro-seconds to enqueue and dequeue a message, if we want to introduce a new layer into the design...
  6. Re: multiple writers and single read FIFO queue performance

    we cannot have reader thread keep running without waiting, and we want to have better throughput by read any messages enqueued as soon as possible, currently we use pthread_condwait() and...
  7. Re: multiple writers and single read FIFO queue performance

    thanks a lot for pointing out a direction.

    one question for the idea of one local queue per writer, how can we avoid the reader thread to avoid blocking by a writer which is a bit free?
    and we...
  8. multiple writers and single read FIFO queue performance

    Hi All,

    we have designed a FIFO queue with pthread mutex and its conditionWait(), inside the queue, we use std::deque, which is quite efficient. and we only enqueue & dequeue pointers to objects,...
  9. Replies
    8
    Views
    822

    Re: Will you solve this tricky question?

    let me remove my codes. :)
  10. Thread: atof error

    by sandodo
    Replies
    21
    Views
    2,254

    Re: atof error

    Thanks a lot to all of you. You guys are great.

    All my best!
  11. Thread: atof error

    by sandodo
    Replies
    21
    Views
    2,254

    Re: atof error

    Thanks Paul McKenzie for the helpful link. :wave:



    Thanks. the example of 1/3 cannot be represent by decimal number is very good.

    However for
    integer*2**i, cannot understand.........
  12. Thread: atof error

    by sandodo
    Replies
    21
    Views
    2,254

    Re: atof error

    Thanks! I searched, but didnot find the answer. Maybe not searching enough. :blush:
  13. Thread: atof error

    by sandodo
    Replies
    21
    Views
    2,254

    Re: atof error

    One question: I cannot tell why a float equal to 333.33 cannot be print correctly to screen? And after we run ff = f1 + f2; the result is not 333.33? does it mean that result of f1 + f2 will be...
  14. Re: C++ String: How to convert a string into a numeric type?

    In addition to FAQ:

    Please note that using function sccanf() to convert string into f with float type,

    sscanf(str_float, "%f", &f);

    The result may not be what you want.
    refer to the example...
  15. Replies
    18
    Views
    2,664

    Re: A question for C++ expert on ++a and a++

    the link provided by exterminator explain one more factor, a++ and ++a can be evaluated at the same time, which can mess up the memory. :ehh: so maybe undefined behavior will be more correct than...
  16. Replies
    18
    Views
    2,664

    Re: A question for C++ expert on ++a and a++

    yes, I guess it is the reason. Thanks a lot guys!


    int operator *(const int & lhs, const int & rhs);

    in the function operator , no compiler can guarantee that lhs will be processed before rhs,...
  17. Replies
    18
    Views
    2,664

    Re: A question for C++ expert on ++a and a++

    Yes, but I prefer you to think about the answer before run it in your platform.

    I cannot answer why the output it is, so I think some expert can explain it. And thanks to explain more about...
  18. Replies
    18
    Views
    2,664

    A question for C++ expert on ++a and a++

    This is the question for C++ expert, what will be the output of following codes and why?

    Thanks a lot in advance!


    #include <iostream>

    int main()
    {
    int a = 5;
  19. Thread: Re-use in C?

    by sandodo
    Replies
    2
    Views
    579

    Re-use in C?

    Is it possible to reuse the functions in C for different data types in run time?

    For example: I have functions to process link list: T represent any data types:



    typedef struct {
    ...
  20. Replies
    16
    Views
    1,650

    Re: Is this valid initialize of char []

    Thanks, but I tried to init den as following, and I changed the arguments type of const_str1 & const_str2 to const char*

    const char* dent[] = {const_str1, const_str2};

    the compiler reports...
  21. Replies
    16
    Views
    1,650

    Re: Is this valid initialize of char []

    to microcode: it is for initialization of the array. maybe you can see more clearly as following example:
    char* dent[] = {NULL, NULL};

    for approach:

    char const_str[] = "a test";

    char*...
  22. Replies
    16
    Views
    1,650

    Re: Is this valid initialize of char []

    no,
    char* dent[] = {0}; is declared as an array of char * and dent[0] is init to be NULL

    I am considering assign an array of char* to some char* variables passed into a function as arguments.
  23. Replies
    16
    Views
    1,650

    Re: Is this valid initialize of char []

    Thanks for all your replies.

    I think it is supposed to let programmer only modify the define of SOFTVERSION so that all other part of the codes know that now version changes to a new one.

    And I...
  24. Replies
    16
    Views
    1,650

    Re: Is this valid initialize of char []

    Sorry, the SOFTVERSION is actually a define


    #define SOFTVERSION "5.46"

    by the way, is it possible or isthere a way to do init a char* [] like this?


    #define str "a string"
  25. Replies
    16
    Views
    1,650

    Is this valid initialize of char []

    Hi,

    I see the initializition of a char array like this:


    char ident[] = "@(#) You are running version "SOFTVERSION ;

    SOFTVERSION is a char *;

    Is this a valid char [] declaration & init...
Results 1 to 25 of 137
Page 1 of 6 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center