reading from stdin in c++
<p>i am trying to read from stdin using c++, using this code</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

int main() {
    while(cin) {
        getline(cin, input_line);
        cout &lt;&lt; input_line &lt;&lt; endl;
    };
    return 0;
}
</code></pre>

<p>when i compile, i get this error..</p>

<pre><code>[root@proxy-001 krisdigitx]# g++ -o capture -O3 capture.cpp
capture.cpp: In function âint main()â:
capture.cpp:6: error: âinput_lineâ was not declared in this scope
</code></pre>

<p>any ideas whats missing?</p>
