How so isn't it working? Compiler error? Returning different number? Crashing?
I'm not familiar with the apstring class, not sure why the AP academics don't just use string, but that's beside the point.
EDIT: Also, your variable is example, not example_c. And I think the method in that class is c_str(). Unless you didn't copy and paste, that should be a good hint. The compiler should have given you a pretty straight forward error about that. Learn to use the compiler errors for assistance.