| <<< | Index | >>> |
|
// String.h
class String {
public:
int length() const;
void append( char* s );
private:
int m_length;
int m_bufSize;
};
// String.cpp
int String::length() const
{
return m_length;
}
void myfunc( String const& str ) {
int len = s.length(); // Ok
s.append( "blah" ); // Compiler error
}
|
| <<< | Index | >>> |