teempe icon

Untitled

teempe | PRO | 06/07/12 11:05:59 AM UTC | 0 ⭐ | 115 👁️ | Never ⏰ | []
C++ |

580 B

|

None

|

0 👍

/

0 👎

#include <iostream>
using namespace std;
#include <fstream>
 
 
int main(int argc, char *argv[])
{
    /*
    format pliku to
    '
    1 2 32 1392 73 213
    9 23 4 1 874 9 0 
    '
    odstepy to spacja 
    */
 
    fstream *F( "C:\\Users\\diler\\Desktop\\aha", ios::in);
    char * _w = NULL, _a;
    int _contuer, _kol;
 
    if(F.good())
    {
        _a = F.get(); // znak pobieramy
        if( _a == '\n' ) _kol = counter; //ilość kolumn
        else if( _a != ' ') ++_contuer; // liczymy ile znakow ma plik   
    }
    cout << _counter << endl << _kol << endl;
    int *_tab = new int [_kol][_counter];
 
 
    F.close();
}

Comments