Possible Duplicate:
When should I use the new keyword in C++?
I don't know the difference between case 1 and case 2:
I define a struct below:
struct Graph {
int ID;
}
Case 1:
Graph g;
g.ID = 1;
case 2:
Graph* g = new G();
g.ID = 1;
Are these two cases the same? What's the difference?