Hi all
my teacher say there is something wrong with this piece of code, but i
can't figure it out, help !
void GetMemory(char *p, int num)
{
p = new char[num];
}
int main()
{
char *p;
GetMemory(p, 100);
...
...
}
any wrong with this piece of code?
|