Is C++ a good choice to make bots?

No, C++ is not a good language for coding something utility like bots. It is both too complex and too detailed for that. You'll find yourself spending too much time writing boilerplate code, abstractions, etc. instead of actual working logic. As a rule of thumb: do not code utility stuff like bots in compiled languages. Interpreted or JIT-compiled languages like Python, PHP, Lua, and Ruby are the best fit for the task.
Frankly, if you need to develop a tool quickly then yes, use PHP, Python etc.
But if you need a very powerful tool you have to use C++ etc.
 
I've been hired in the past to reverse engineer various commercial sneaker bots and tools.

NONE of them were written in C++.

They were all written with js/node or C#. The majority were written with js/node.

There's a good reason for that.

Bots don't need insanely optimized performance to get the job done.

We're not talking about Uber here.

Node is plenty performant to make a bot.

You can code much quicker, learn js much quicker, and therefore make money quicker.
 
Wanted to add one more thing. I don't see an edit button on my previous post. If I'm missing it someone tell me.

I do seem to remember one bot I looked at being written in a compiled language that may have been c++

I wasn't saying that no bot has ever been written in c++. Or that no bots are written in c++.

But I am saying, that most of them are not written in c++, because it's just not needed.

I would guess that if a bot was written in c++, the reason would be that c++ was just the language the bot maker happened to already know and be good at.

The majority I've looked at, were written with js/node.
 
Hello!

I am quite familiar with JavaScript and I need to learn new programming language for making bots.
Bots for communicators (ICQ, Skype, Trillian and many other). Somebody whop type to me this bot should answer everyone.
And the bots for Facebook (private messages), Pinterest (make follows) and other.

Is C++ a good choice for making these kind of bots?
Python is basically made for your needs, it’s a scripting language, which means the development time is faster, on the expense of execution speed.
In c++, Java, c# etc. it’s the exact opposite as they are complied languages which makes them faster, but you need to write more code.


Unless you need to calculate tons of stuff (for bots you don’t) than “python is fast enough”.

C++ is great for more demanding and complicated apps.

Hope I helped you, cheers
 
C++ give best performance ever but if good coded.
When I need more performance, I do not use python or similar languages.
You can look json decode libraries and you can compare.
 
One other thing is that bots spend most of their time waiting for requests/responses or parsing JSON/HTML. So if you do go for Python there are a few things you can do to maximise performance:

- use asyncio to make your I/O run on an event loop and use less system resources
- use a high performance JSON parsing library like 'orjson' instead of the built-in json library.
- use a high performance HTML parser such as 'selectolax'
 
I came here to big up C#!
 
C# or Java I would say.

Python is nice but if you're going to scale it up and have to manage loads of threads python starts to fall behind c#/java there.

I agree C++ is probably overkill.
 
It depends on the use case and performance needed.

I will start with Python but if the bot grows and need more resources, then performance will be an issue, that's when you need to think about the speed and performance benefits of C++.
 
A picture is worth a thousand words. Making a HTTP request on C++ easy as this,

Code:
#include <iostream>

#include <cpr.h>

int main() {

    auto response = cpr::Get(cpr::Url{"https://www.google.com"});

    std::cout << response.text << std::endl;

}

None of people on the thread are honest with you.

Let me answer your question. Yes, C++ is a better language to create Bots in.

I'm going to go ahead and say C++ is easier than Python ever be.

Python code become unreadable after you extend 100 lines.

C++ these days doesn't require you to manage memory manually as we have a concept called RAII. I saw a poster here that shared a code for a CURL request which is not C++ but C.

C++ and C separate languages but you can use C code in C++ due to backward compatibility

The rant by Linus and all other monsters drove people away from **real** C++.

There are ton of libraries in C++ that make your life easier (and faster).

The above code used CPR library [https://github.com/whoshuu/cpr]

You don't pay any performance plenty for using these libraries because Modern C++ has zero-cost abstractions built in.

By going with C++, you avoid the need for re-writes when you need performance.

Bjarne Stroustrup said: "Within C++, there is a much smaller and clearer language struggling to get out."
 
Last edited:
A lot of languages are made from c++, so might as well go with the top c++.

I done
Javascript
PHP
MySQL
HTML 1,2,3
CSS 1,2,3
MySQL 1,2
Adobe products.

When I did all this above most of my friends learn java and ended up with really big money jobs and still today.

The rest geeks have done c#, c++ and there on even better money than the java guys. (( java not javascript different world))

But PHP with MySQL good money as well, but only quick scripts

But if you want to code c++ way forward but that coding comically.

I was on a course for python but the course didn't have enough client's to get the video's, so I am looking for a good course on video step via step, the only way forward in marketing is to automate and scrape fast.

If anyone can suggest a python course from udemy I would love to no the link, must be explained clearly cheers.

Pm the link if you no one cheers.
 
Last edited by a moderator:
A lot of languages are made from c++, so might as well go with the top c++.

I done
Javascript
PHP
MySQL
HTML 1,2,3
CSS 1,2,3
MySQL 1,2
Adobe products.

When I did all this above most of my friends learn java and ended up with really big money jobs and still today.

The rest geeks have done c#, c++ and there on even better money than the java guys.(( java not javascript different world))

But PHP with MySQL good money as well, but only quick scripts .

But if you want to code c++ way forward but that coding comically.

I am well fond of C++, Javascript, Haskell and ASM

C++ changed a lot after 2011 and it become a whole new language but people still stuck to C with Classes and that ugly raw pointers.

The barrier of entry to C++ is lower than ever before but the elitism and hate prevents people entering into it.
 
Yea C++ can be usefull, but if you don't know too much programming don't do C++ .
C++ is hard language, and you have to know what are you doing.

For bots python is best, it's very easy to learn language, simple to use, lot's of libraries etc.
I don't know any libraries for Skype or ICQ but i bet you will find some.

Python is your best friend here.


What kind of answers they are suppose to be? It's same every time or based on previous message?
My issue with python is if u plan on distributing/selling the bots. Compiling in pythin is terible and always gives a ton of errors.
 
My issue with python is if u plan on distributing/selling the bots. Compiling in pythin is terible and always gives a ton of errors.

Python doesn't compile like C++ does. Python works well for Linux but for other systems you may need Anaconda Python.

C++ doesn't have this problem.
 
I think c++ is a bad choice for this task. C++ is better for clienside applications if its about speed/performance etc. I would choose for bots python. U will be much more productive because in python u dont need to care about pointers, memory and stuff.
 
Python doesn't compile like C++ does. Python works well for Linux but for other systems you may need Anaconda Python.

C++ doesn't have this problem.
Python works best for Linux systems? Hmmm... ok mate.
 
Linux is absolutely the recommended OS for development stuff. Much easier to install all the required libs and stuff. go with linux and the most good IDEs (like those from jetbrains) are also available for linux.
 
Linux is absolutely the recommended OS for development stuff. Much easier to install all the required libs and stuff. go with linux and the most good IDEs (like those from jetbrains) are also available for linux.
This ain't true anymore.

Windows + Wsl 2 + Docker is the absolute power now. You get best of both platforms.
 
Back
Top