#include "SWindows.h" // set up for windows #include "Graphics.h" // graphics functions & RGB definition #include "RGBNames.h" // RGB names #include "Random.h" // random numbers #include "FileTool.h" // file tools #include "Text.h" // fonts and text #include "Delay.h" // delay controls #include "SoundChannels.h" // play music // volume 0 .. 255 // duration in half-milliseconds // midiNote = midi # = 1 .. 127; middle C = 60 // prototypes void main(); // definitions void main() { // еее OPEN THE TEXT AND DRAWING WINDOWS: BigWidePair(); // еее THE BODY OF THE MAIN FUNCTION ifstream myFile; string myFileName; char ch; /*---------------------------------------------------------------- myFile.open("data1.txt"); // straight C++ //while (myFile >> ch) cout << ch; // skips spaces //while (myFile.get(ch)) cout << ch; /*---------------------------------------------------------------- OpenFile(myFile, "data1.txt", textread); // from FileTools //while (myFile >> ch) cout << ch; // skips spaces //while (myFile.get(ch)) cout << ch; /*---------------------------------------------------------------- SoundChannel A; long notenum; const short tempo = 2000; short timer; myFile.open("twinkle"); while (myFile >> timer >> notenum) A.Play(100, tempo/timer, notenum); /*---------------------------------------------------------------- SelectOldFileName(myFileName); //myFile.open(myFileName.c_str()); //NOT myFile.open(myFileName); // or //OpenFile(myFile, myFileName, textread); //while (myFile >> ch) cout << ch; // skips spaces //while (myFile.get(ch)) cout << ch; /*---------------------------------------------------------------- if (SelectOldFileName(myFileName)) if (OpenFile(myFile, myFileName, textread)) { while (myFile.get(ch)) { cout << ch; } } else << cout "error" << endl; /*---------------------------------------------------------------- string FullName; while (Confirm("Test Old File?", true)) { if (SelectOldFileName(FullName)) while (myFile.get(ch)) { cout << ch; } else cout << "еее Cancel еее" << endl; cout << endl; } while (Confirm("Test New File?", true)) { if (SelectNewFileName(FullName,"Junk")) cout << FullName << endl; else cout << "еее Cancel еее" << endl; cout << endl; } */ // еее THAT'S IT еее QUIT WHEN USER HITS RETURN //PressReturn("Terminating Program"); }