No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include <iostream> using namespace std; class Lists{ public: void insert_head(int insert); void remove_head(); void insert_tail(int insert); void print(); Lists(); private: Node *head; Node *tail; }; struct Node{ int data; Node *link; }; int main() { Lists temp; temp.print(); return 0; system("PAUSE"); } Lists::Lists(){ head = new Node; head->Link=tail; tail->Link=NULL; } … |
|
In my program, I used a vector to store the file. The file contains the data (see below). Do I need to create two vectors to store the data below as integers and strings? Or is there a shorter way to do this, and just allow the user to enter … |