Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is my code is C++ in three separate files. Can you please tell me why my code does not work? Thank you * BinarySearch_tes...

This is my code is C++ in three separate files.
Can you please tell me why my code does not work?
Thank you image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
* BinarySearch_tes... U Binary Search. BinarySearch.cpp 1 Hinclude 2 using namespace std; 4 int recursiveBinarySearch(int array(), int start_index, int end_index, int targetValue); Binary Search.hu BinarySearch.cpp V * Binary Search_tes... 0 1 #include 2 #include 3 #include "BinarySearch.h" 4 using namespace std; 5 6 int recursiveBinarySearch(int array(), int start_index, int end_index, int targetValue); 7. if (start_index 3 #include "BinarySearch.h" 4 using namespace std; 51 6. int main() { 7 ifstream inputFile; 8 int size; 9 inputFile.open("dataarray.bin", ios::in | ios::binary); 10 inputFile.seekgco, ios::end); 11 size inputFile.tellgo / sizeof(int); 12 inputFile.seekg(); 13 int array: 14 array - new (nothrow) int[size]; 15 inputFile.read(reinterpret_cast array), size*size(int): 16 inputFile.close(); 17 int value, result; 18 cout > value; 20 result - recursiveBinarySearch(array, 0, size 1, value); 21- if (result _ Console: connection closed (Running: 1 seg) BinarySearch.cpp:7:1: error: expected unqualified-id before 'if' if (start_index (array), size*size(int)); pu at /vpl_execution: line 4: ./BinarySearch_test: No such file or directory bu rra mpu

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

=+4 Develop and deliver the CCT program.

Answered: 1 week ago