Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- typedef struct data {
- float x;
- float y;
- }datasample;
- int main() {
- int N, i;
- datasample dulieu[20000];
- N = 2;
- ifstream myReadFile;
- myReadFile.open("assignment1.input.txt");
- char output[100];
- i = 0;
- if (myReadFile.is_open()) {
- while (!myReadFile.eof()) {
- myReadFile >> dulieu[i].x >> dulieu[i].y;
- cout << dulieu[i].x << " " << dulieu[i].y << endl;
- i++;
- }
- }
- myReadFile.close();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement