Example program illustrating use of the ns3::Ptr smart pointer.
More...
#include "ns3/command-line.h"
#include "ns3/object.h"
#include "ns3/ptr.h"
#include <iostream>
Go to the source code of this file.
Example program illustrating use of the ns3::Ptr smart pointer.
Definition in file main-ptr.cc.
◆ ClearPtr()
◆ StorePtr()
Example Ptr manipulations.
This function stores it's argument in the global variable g_ptr
and returns the old value of g_ptr
.
- Parameters
-
- Returns
- The prior value of
g_ptr
.
Definition at line 67 of file main-ptr.cc.
References g_ptr, and prev.
◆ g_ptr