Skip to content

Instantly share code, notes, and snippets.

@pfallasro
Created June 22, 2013 17:17
Show Gist options
  • Save pfallasro/5841646 to your computer and use it in GitHub Desktop.
Save pfallasro/5841646 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;
int main() {
int i, j, dimension, elemento;
ifstream myfile;
myfile.open ("example.txt");
while ( myfile.good() ){
if(i==0){
myfile >> dimension;
cout << dimension;
int matriz [dimension][dimension];
}else{
myfile >> elemento;
cout << elemento ;
}
cout << endl;
i++;
}
myfile.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment