// kurs.cpp: определяет точку входа для консольного приложения.
//
# pragma once
#include <conio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
# define FNAME "1.txt"
//#include "conv.h>
#include "stdafx.h"
using namespace std;
int main ()
{
// Имя открываемого файла, задано в директиве define
ifstream myFile(FNAME);
if (!myFile)
{
cout<<" Не открыт файл "<<FNAME;
_getch();
return 1;
}
// Вывод содержимого файла на экран
char ch;
while (myFile.get(ch));
_getch();
cout<<ch;
// счетчик строк используем count
string textline;
char matr[ROW][COL];
int count=-1;
// Оператор цикла для чтения строк до конца файла
while (!myFile.eof())
{
getline(myFile.textline);
count++;
strcpy (matr[count],textline.c_str());
}
_getch();
}
пока только дошел до этого...разбираюсь с листингом программы
// Прототип функции вывода части матрицы, в которую переписан листаемый файл
void matr_part_out(char matr[][COL], int icur, int how_many, int x, int y);
// Очистка окна от старого текста
void clear_window (int left, int top, int right, int botton, char color);
// Для перемещения полоскового курсора, для выделения цвета фрагмета экрана
void highlight( int left, int top, int lenght, char color);