Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions