- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
#include "stdafx.h"
#include "expression.h"
#include <vector>
int _tmain(int argc, _TCHAR* argv[]) {
//Инициализация
	std::vector<expression> arrayOfExpressions;
	std::string inputString;
//Ввод количества выражений
	printf( "Enter expressions count: " );
	int countOfExpressions = 0;
	scanf( "%d", &countOfExpressions );
//Ввод самих выражений
	for ( int i = 1; i <= countOfExpressions; i++ ) {
		printf( "Enter expression: " );
		scanf( "%s", inputString );
		arrayOfExpressions.push_back( expression( inputString ) );
	}
//Подсчёт операторов
	int total = 0;
	for (int i = 0; i < arrayOfExpressions.size(); i++)
		total += arrayOfExpressions.at(i).operatorsCount();
	printf( "Total operators = %d", total );
//Освобождение памяти
	arrayOfExpressions.erase(arrayOfExpressions.begin(),arrayOfExpressions.end());
	return 0;
}
                                 
        
            Один из уже известных вам студентов написал вот это. Вроде получше.
        
        
Где здесь main?
>_tmain
Где здесь С++?
а все остальные - пехепе?
Буээээ.