discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] std::cin inside work()


From: Activecat
Subject: [Discuss-gnuradio] std::cin inside work()
Date: Wed, 26 Mar 2014 16:17:37 +0800

Dear sir,
Why below custom block doesn't work..?


    int
    console1_impl::work(
              int noutput_items,
              gr_vector_const_void_star &input_items,
              gr_vector_void_star &output_items)
    {
        int *out = (int *) output_items[0];

        int x;
        std::cout << "Please key in an integer: ";
        std::cin >> x;
        std::cout << "You have given me " << x << std::endl;

        out[0] = x;
        return 1;
    }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]