Hi everyone,

I'm recently in C++ and I would like to develop one C++ code that read a file ".txt" of strings and numbers with different size of columns and lines.

After I need to get the frequencies of each element of the same column.

Cheers,

SADSDW

Example:

ABC DEF GHI JKL
111 222 333 444
555 666 777 888
111 777 888 999
111 111 111 666

Column ABC:

Found:
111
555

Frequencies of 111: 75%
Frequencies of 555: 25%

Recommended Answers

All 2 Replies

I'm sorry, what is the algorithm to create the matrix? And could you show me your coding part if any?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.