I'm doing pset4 which uses the Stanford Portable Library. David mentioned the documentation is buggy but it appears wrong in some parts. In particular there is a type GRectangle and the method getBounds in the documentation that is not in the library and can't be accessed. Does anybody know how to get the full library?


The provided version of the Stanford Portable Library does provide GRectangle. Your code just needs to include the correct .h file in order to be able to use it. In this case, the file you need is gtypes.h:

#include "gtypes.h"

As for the documentation being incorrect, this does seem to be the case in some instances. However, you can refer to the .h files in the spl/ subdirectory provided with pset4. There you will see what functions are actually available, as well as various use case examples.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .