Account class design using OOP paradigm
Use unordered_map to maintain account number and balance.
You can use unordered_map(hash table) for checking if an acc_num already exists or not and the membership check in unordered_map is O(1).
You can use int64_t for long long int
You can int64_t for long long int, uint64_t for unsigned long long int and since bank balance can't be less than 0 use uint64_t for balance.
count is unnecessary, use unordered_map::find.
You can eliminate count when you are using unordered_map to check if acc_num exists use unordered_map::find.
Create alias using using.
using account_table not only allows you to give a short name to a complex type, but it puts the type definition in a single place. Then if you change the underlying type you only need to change it in that one place.
Avoid using using namespace std;
Find more details here why using namespace std; is considered bad praactice
I added Account::print_details, it prints acc_num --&gt; balance
Refactored code
#include&lt;iostream&gt;
#include&lt;unordered_map&gt;
#include&lt;string&gt;

class Account{
    using account_table = std::unordered_map&lt;std::string, uint64_t&gt;;
    private:
        account_table table;
    public:
        void add_acc();
        void print_details();
};

void Account::add_acc(){
    std::cout&lt;&lt;&quot;Enter account number : &quot;;
    std::string acc_num;
    std::cin&gt;&gt;acc_num;
    if (table.find(acc_num)==table.end()){
        uint64_t balance;
        std::cout&lt;&lt;&quot;Enter balance : &quot;;
        std::cin&gt;&gt;balance;
        table.insert({acc_num, balance});
    }
    else{
        std::cout&lt;&lt;&quot;Account number already exists\n&quot;;
    }
}

void Account::print_details(){
    for(auto&amp; d: table){
        std::cout&lt;&lt;d.first&lt;&lt;&quot;--&gt;&quot;&lt;&lt;d.second&lt;&lt;std::endl;
    }
}

int main(){
    Account A;
    char ch{'Y'};
    
    while(ch){
        A.add_acc();
        std::cout&lt;&lt;&quot;Want to add another account : &quot;;
        std::cin&gt;&gt;ch;
        if (ch!='Y' &amp;&amp; ch!='y'){
            break;
        }
    }
    A.print_details();
    return 0;
}

Example run
Enter account number : 1234
Enter balance : 50
Want to add another account : y
Enter account number : 1234
Account number already exists
Want to add another account : Y
Enter account number : 12345
Enter balance : 12
Want to add another account : n
12345--&gt;12
1234--&gt;50


You can use clang-format-9(code formatting tool)
Example:
clang-format-9 -i -style=Google your_file.cpp