Dudearoo
Useing Code::Blocks
ok, ive got a somewhat simple error that i cant crack, First heres my code.
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <time.h>
#include <conio.h>
#include <stdlib.h>
#include <iomanip>
#include <windows.h>
// so to use strcmp
#include <cstring>
#include <fstream>
using namespace std;
int main()
{
ofstream myfile ("savefile.txt", ios::ate | ios::in | ios::trunc | ios::out);
char stringsaveT[90];
string question;
if (myfile.is_open())
{
cout << "This is a .txt file save test.\n please type in a string of characters, and close the program\n once you open the program\n please type in open. " << endl;
cout << "" << endl;
cin >> question;
if (question == "open")
{
myfile >> stringsaveT[90];
cout << stringsaveT[90] << endl;
}
else if (question == "print")
{
cout << " Please Type the string you want to save." << endl;
cin >> stringsaveT;
myfile << " "<< stringsaveT <<" ";
}
myfile.close();
}
cout << "Last Cout! program reverts here first? and closes!" << endl;
return 0;
}
all i want to do is to read the data from savefile.txt, ok so here's my error code
FILESAVETEST\main.cpp|29|error: no match for 'operator>>' in 'myfile >> stringsaveT[90]'|
i cant figure out the problem, heres where i got a refrence for a part of the code, From youtube
i umderstand the error code just not what to put down instead then >>.
Thanks you guys!
:)
(by the way i finaly found out how to save error codes to my clipboard. LOL)