Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <sstream>
- using namespace std;
- void read_file(){
- ifstream fin("INPUT.txt");
- string N;
- int N_int;
- getline(fin, N);
- N_int = atoi(N.c_str());
- int** int_mas2 = new int*[N_int + 1, N_int + 1];
- string* string_mas1 = new string[N_int+1];
- for (int j = 0; j < N_int; j++){
- getline(fin, string_mas1[j]);
- for (int i = 0; i < N_int; i++){
- int_mas2[i][j] = atoi(string_mas1[i].c_str());
- cout << int_mas2[i][j] << " ";
- }
- //cout << string_mas1[j] << endl;
- }
- fin.close();
- }
- void main(){
- read_file();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement