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

Search:

Type: Posts; User: vincegata

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,228

    Re: Exit two-threaded program with user input?

    @OReubens -- about rule number one, why cannot I have a worker thread that is waiting for a user input from console?
  2. Replies
    5
    Views
    1,228

    Exit two-threaded program with user input?

    Hello,



    // clang++ -g -std=c++11 main.cpp -pthread
    #include <iostream>
    #include <thread>
    #include <unistd.h>

    void thread1(void)
  3. How to set up two objects to communicate with each other asynchronously?

    Hello,

    Here is what I've got so far:



    # Makefile
    CXX = clang++
    CXXFLAGS = -g -std=c++11
  4. Re: Template specialization does not work for user-defined object.

    @laserlight -- that's was because of the string -- thanks a lot.
  5. Re: Template specialization does not work for user-defined object.

    Thank you for responding but I get the same error. I'd like to use template specialization.

    main.cpp:17:14: error: invalid operands to binary expression ('QuoteClass' and 'QuoteClass')
    if...
  6. Re: Template specialization does not work for user-defined object.

    Thank you for responding but I get the same error. I'd like to use template specialization.

    main.cpp:17:14: error: invalid operands to binary expression ('QuoteClass' and 'QuoteClass')
    if...
  7. [RESOLVED] Template specialization does not work for user-defined object.

    Hello,

    Can you take a look why I am getting compile error.

    Thank you.




    // clang++ main.cpp -g -std=c++11 -o main
  8. Converting int to std::string using istringstream inserts commas

    Hi,

    So I have a following function that converts int to string however it inserts the commas for thousands, millions, and so on. e.g. 65432 -> "65,432".
    How do I make the conversion but have a...
  9. Re: How to pad a string with trailing zeros using ostringstream

    That's slick, @2kaud, thank you.
  10. Re: How to pad a string with trailing zeros using ostringstream

    the output:
    99W8

    I would like it to be:
    99W8000
  11. [RESOLVED] How to pad a string with trailing zeros using ostringstream

    Hi,

    The code that I have does not work. Could some help -- thanks.





    #include <iostream>
    #include <iomanip>
  12. Re: Problem with ostreamstring and setfill(): size() of the resulting string is one m

    how could I've missed it... thank you!
  13. [RESOLVED] Problem with ostreamstring and setfill(): size() of the resulting string is one more.

    Hi,

    The s1.size() actually returns 4, and test for equality fails. I am using g++ on Linux, debug target.

    Could someone help. Thank you.




    #include <iostream>
  14. Re: [RESOLVED] Two-way event-driven communication between objects (similar to produce

    @razzle - I asked a specific question and if you don't know the answer you just move on - it's that simple. I closed the thread because my requirements has changed.
  15. Re: Two-way event-driven communication between objects (similar to producer-consumer)

    Sorry for coming back so late, I've been busy at work over timing. I know there should be a buffer for an asynchronous communication, I am just trying to figure out in which way the classes are aware...
  16. Re: Two-way event-driven communication between objects (similar to producer-consumer)

    I updated my post, toApp() is the function I need to be implemented.
  17. [RESOLVED] Two-way event-driven communication between objects (similar to producer-consumer)

    Hi,

    I need to implement a two-way asynchronous communication between two objects, not using any IPC.

    What I have now is a producer-consumer model where producer sends a number "88" to consumer...
  18. Re: Questions about a sample code on shared memory.

    Thank you for all the help I received, I've decided to merge the processes to use observer pattern instead of using shared memory.
  19. Re: Questions about a sample code on shared memory.

    @Codeplug - ah, you helped me with multithreading too and now it came to the full circle... :)

    I do use that code: it is now my consumer process where "producer" thread receives the data over FIFO...
  20. Re: Questions about a sample code on shared memory.

    @OReubens - I am considering of merging my producer and consumer into the same process instead of using shared memory hence was my question about locked-free linked list. I cannot use...
  21. Re: Questions about a sample code on shared memory.

    Yeah, I should do some testing too.
  22. Re: Questions about a sample code on shared memory.

    @Codeplug - I am not sure if you read my post above the one that you quoted, but I do already have a running application using FIFO and it is too slow for me.
  23. Re: Questions about a sample code on shared memory.

    @OReubens - so I have a producer and a consumer, the point is to send the data as fast as possible. Since synchronization takes time, a person who developed the code that I posted, used polling...
  24. Re: Questions about a sample code on shared memory.

    @razzle - I am staying away from the third parties.

    @codeplug - these are some financial data and there are a lot of them. I am using FIFO right now (with your help too btw :) ) but I found it to...
  25. Re: Questions about a sample code on shared memory.

    @OReubens, that code sample is about using shared memory without locking so to reduce latency. I am looking at the codeplug's sample now.

    @razzle, thanks for the code snippet, I'll re-use it...
Results 1 to 25 of 91
Page 1 of 4 1 2 3 4





Click Here to Expand Forum to Full Width

Featured