struct:
1.no inheritance 不能继承
2.passed by value 值传递 (传递时,会复制copy一份,在栈stack上)
3.its initializer that, whose arguments are all of its vars
class:
passed by reference 引用传递(储存在堆heap, 当传递给method时,实际传递的是指针pointer,实际上指向的是同一个)
1.no inheritance 不能继承
2.passed by value 值传递 (传递时,会复制copy一份,在栈stack上)
3.its initializer that, whose arguments are all of its vars
passed by reference 引用传递(储存在堆heap, 当传递给method时,实际传递的是指针pointer,实际上指向的是同一个)