求助:这几个程序有什么错误?
1.void myFunc( char* p )
{
p = (char*)malloc(100);
}
2.
char* myCopy( char* src , int len )
{
char dest[1000];
memcpy( dest , src , len );
return dest;
}
3.
class MyBaseClass
{
public:
MyBaseClass( void ) { _value1=20; }
private:
int _value1;
};
class MyClass : public MyBaseClass
{
Public:
MyClass( void ) { _value2=10; }
public:
void someFunc1( void ) const { _value2 = _value1; } protected:
int _value2;
};
十分感谢各位巨巨的帮忙。