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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started