#include <iostream>
#include <fstream.h>
#include <string>
#include <vector>
void input(int, std::string);
void output();
using std::vector;
using std::ofstream;
int main()
{
std::string filename = "file.txt";
int number;
vector<int> tileList();
std::cin >> number;
tileList().push_back(number);
input(tileList(), filename);
output();
return 0;
}
void input(vector<int> tileList, std::string filename)
{
//vector<int> tileList; this needs to be erased
ofstream file;
file.open(filename);
//here you need to loop through the tileList vector
//and stick every member of the tileList vector in the file
//file<<vector<int> tileList; this needed to be erased too
file.close();
}
void output()
{
std::string output[100];
ifstream file;
file.open("file.txt");
file>>output[100];
std::cout<<output[100]<<std::endl;
file.close();
}
kadajett 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.