On Wed, 27 August, 2008 11:38 am, Thayne (Mech Stu) wrote:
> This is my modified program from the one inside the libplayer++
> when i run the program it gave me "segmentation fault" for the GetRange.
> Can anyone help me?
This is then a very bad modification of it. And shows that you first need to
learn c++ (sorry).
The example has nothing like that above. That line above tells the compiler
that you will somewhere define a function called Read that will return a
LaserProxy (this is called a declaration, even a forward declaration in that
case, IIRC). What the example has is, in the loop below, a call to the Read()
method of the class PlayerClient through one of its instances, namely robot,
created above. This is the "robot.Read()" of the example.