Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdlib.h>
- #include <windows.h>
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <string>
- #include <cstdlib>
- #include <cmath>
- #include <conio.h>
- #include <time.h>
- #include <MMSystem.h> // Fyrir multi media stuðning
- using namespace std;
- int main()
- {
- system("chcp 1252>nul"); // isl stafir
- cout << "Fýlukallinn" << endl; // titill á leik
- // PlaySound(TEXT("game.wav"), NULL, SND_SYNC); /* lærði af youtube þurfti að bæta við input i propertys
- // spilar hljóð*/
- string valk;//upphafsval
- cout << "SHALL WE PLAY A GAME?" << endl; // texti ef ekkert audio
- cout << "Veldu Y/N (Yes/No)" << endl; //valkostir
- cout << ">>";
- cin >> valk;
- string txtf;
- ifstream txt("ordaskra.txt");
- if (txt.is_open())
- {
- string myArray[5];
- for (int i = 0; i < 5; ++i)
- {
- txt >> myArray[i];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement