pointer function and getline problems

Is it possible to have pointer functions? I find it difficult using cin and getline in a loop. Pls how can I go about this? It's really frustrating.
It's not difficult at all. This echo's stdin to stdout using such a loop.
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
#include <string>

int main()
{
    std::string line;
    while (std::getline(std::cin, line))
        std::cout << line << std::endl;

    return 0;
}
Topic archived. No new replies allowed.