这是我的代码:
using namespace std;
class Network
{
// private function to constructe the nodes with a left and right childed
private:
struct node
{
node* left;
node* mid;
node* right;
char data;
};
node* root;
// public function for the the program
public:
char *Nodes ;
Network()
{
root = NULL;
}
char Link(char,char);
node* Network::Order(char* temp){
cout << "Order:" << sizeof(temp);
node* store;
store = new node[sizeof(temp)];
};
};
char Network::Link(char temp, char temp1){
};
// Smaller elements go left
// larger elements go right
/*
*
*/
int main() {
Network object;
char p[11];
p[0] = 'a';
p[1] = 'b';
cout << "p:" << sizeof(p);
object.Order(p);
return 0;
}
输出:p:11 订单:4
为什么订单 4 它应该是 11 因为我传递了数组 pt