Question: C++ function name int X(string*letter,string*address, int length)This function takes in addressing a string array and it will compares each letter in the string letter.It will

C++

function name int X(string*letter,string*address, int length)This function takes in addressing a string array and it will compares each letter in the string letter.It will return the number of address that are possible to from. DO NOT use any platform-specific libraries like "bits/stdc+.h"

The programs need to include the class declaration with int X(string*letter,string*address, int length).

class C{

public:

int X(string*letter, string*address, int length);

};

your main may look like

int main{

string letter="ABC";

string address[]={"123","ABD","AB"};

int length=sizeof(address)/sizeof(address[0]);}

//and call the function.

ex.

"AABBCCDDFE09271"

{"AB 1","AA CC BB","12 K"}

It will return 2 because it can not form 12K because no K in the given letter and we only consider one address at a time.

ex.

"AABBCCDDFE09271"

{"990 AB","A A","927 DA"}

It will return 2, it can not form 990AB because it only have one 9.

Assume that letter one contains upper letter 'A'-'Z' and int 0-9 and the space " " in address don't need to compare.

Please also run the code in the C++ shell, check the output is the same. Thank you

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 Programming Questions!