How to implement Linked List with structs as data field?

typedef struct route_request{
// different datatypes

}Route_Request;

typedef struct fetch_rreq{
Route_Request rreq;
ClockType Timestamp; // Time at which Route request packet arrived.
}Fetch_Rreq;

//Linked list
typedef struct store_rreq{
Fetch_Rreq req;
store_rreq *next;
};


My Requirement is to take multiple Route_Request packets as they arrive at a node, fetch the time of arrival, save them both in Fetch_Rreq. Then store Fetch Rreq into store_rreq(linked list). Then scan them for a variable from Route_Request and fetch it. How can i implement it?
1
2
#include <list>
std::list<Route_Request> requests;

http://www.cplusplus.com/reference/list/list/
Topic archived. No new replies allowed.