Question: C++ Help PLEASE A constructor that receives nothing and prompts the user to enter a file name. The constructor will try to open one of

C++ Help PLEASE

A constructor that receives nothing and prompts the user to enter a file name. The constructor will try to open one of the network data files entered by the user. An appropriate error message should be shown if the data file cannot be opened. This function will loop until it receives proper input and successfully opens the file. It will then read the first line of the file (the number of users in the social network) and dynamically create an array of vectors of integers, the size equal to the data in the first line of the file.

network_data = new vector[size]; // this creates an array of size number of vectors

Additionally, the constructor should call the init_matrix() method supplied below that creates a size by size two dimensional similarity_matrix and initializes it to zeroes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!