ok im using the tutoral example and im tying to change it so i can get more tan justthis as an output and i want o make it like an array so i can use a cin to prompt for a number and have it go to that part of the string and output the charecter in that position
Code:#include <fstream> #include <iostream> using namespace std; int quarry; int main() { char str[10]; ofstream a_file ( "example.txt" ); a_file<<"This text will now be inside of example.txt"; a_file.close(); ifstream b_file ( "example.txt" ); b_file>> str; for(int x = 15;x != 0;x--) { cin>> quarry; cout<< str[quarry]<<endl; } cin.get(); }