#include <iostream>
using namespace std;
void GetMemory1(char **p, int num)
{
*p = (char *)malloc(sizeof(char) * num);
}
void GetMemory2(char *p, int num)
{
p = (char *)malloc(sizeof(char) * num);
}
int main(int argc, const char* argv[])
{
char *str1 = NULL;
GetMemory1(&str1, 100);
strcpy(str1, "Hello");
cout << str1 << endl;
char *str2 = NULL;
GetMemory2(str2, 100);
strcpy(str2,"Hello");
cout << str2 << endl;
return 0;
}