Severity Code Description Project File Line Suppression State
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 32
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 34
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 36
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 37
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 37
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 43
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 44
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 45
Error (active) E0044 expression must have pointer type fstream c:\Users\Admin\Documents\Visual Studio 2017\Projects\C++ Experiments\fstream\fstream\fstream.cpp 46
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 32
Error C2232 '->info_car::make_model': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 32
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 34
Error C2232 '->info_car::year': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 34
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 36
Error C2232 '->info_car::a_price': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 36
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 37
Error C2232 '->info_car::d_price': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 37
Error C2232 '->info_car::a_price': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 37
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 43
Error C2232 '->info_car::make_model': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 43
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 44
Error C2232 '->info_car::year': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 44
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 45
Error C2232 '->info_car::a_price': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 45
Error C2819 type 'info_car' does not have an overloaded member 'operator ->' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 46
Error C2232 '->info_car::d_price': left operand has 'struct' type, use '.' fstream c:\users\admin\documents\visual studio 2017\projects\c++ experiments\fstream\fstream\fstream.cpp 46
Top tip. Tell people the error, rather than making them guess. That said:
cin >> info[i]->make_model;
info[i] isn't a pointer to a info_car; it is an info_car.
Try cin >> info[i].make_model;
In the second loop, i begins too high so you're trying to read an element from the array that doesn't exist. Put: cout << "Trying to read from info[" << i << "]" << endl;
at line 39.