Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created December 4, 2010 06:06
Show Gist options
  • Save onlyshk/727967 to your computer and use it in GitHub Desktop.
Save onlyshk/727967 to your computer and use it in GitHub Desktop.
#include <QtCore/QCoreApplication>
#include "train.h"
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Train* tr = new Train();
vector<Train> *trains;
string destination;
int num;
int time;
for (int i = 0; i < 8; i++)
{
cout << "Number of train: " << 0 << "." << "\n";
cout << "destination: ";
cin >> destination;
cout << "\n";
cout << "Number: ";
cin >> num;
cout << "\n";
cout << "time: ";
cin >> time;
cout << "\n";
tr->SetDestination(destination, trains->at(0));
tr->SetTime(time, trains->at(0));
tr->SetNum(num, trains->at(0));
}
return a.exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment