Question: C++ 2D Array Help I am having trouble with a C++ 2d array. Will rate all helpful solution thumbs up. Thank you! Question: Assumption: -

C++ 2D Array Help

I am having trouble with a C++ 2d array. Will rate all helpful solution thumbs up. Thank you!

Question:

C++ 2D Array Help I am having trouble with a C++ 2d

Assumption:

- There is at least one value in the file, no more than 10 values in one line, and no more than 10 lines.

Requirements:

array. Will rate all helpful solution thumbs up. Thank you! Question: Assumption:

Example output:

- There is at least one value in the file, no more

My code (menu is functional):

#include

#include

#define SIZE 10

using namespace std;

void printarray();

void readFile();

void incrementOne();

void decrementOne();

void addValue();

int main(int argc, char *argv[])

{

ifstream inf(argv[1]);

double data[SIZE][SIZE];

int option = 0;

bool loop = true;

readFile();

while (loop = true)

{

cout

cout

cout

cout

cout

cin >> option;

switch (option)

{

case 1: //Incerement all values by 1

incrementOne();

printarray();

break;

case 2: //Decrement all values by 1

decrementOne();

printarray();

break;

case 3: //Add value to entire array

addValue();

printarray();

break;

case 4: //Exit

return 0;

}

}

return 0;

}

void readFile()

{

}

void printarray()

{

}

void incrementOne()

{

}

void decrementOne()

{

}

void addValue()

{

}

Suppose floating-point values exists in a file as such 3.3 1.1 8.22 6.45 2.1 3 5 7 We would like to read these values into a two-dimensional array and manipulate them in the following ways: 1) Increment each value by 1 2) Decrement each value by 1 3) Add a specific floating-point value to each value

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!