Can we use c++ for designing websites? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Can we use c++ for designing websites?

19th May 2020, 2:50 PM
KWASI NYARKO
KWASI NYARKO - avatar
4 Answers
+ 8
Web design involves writing HTML for structured content and CSS for its presentation. Now, if you're talking about writing a web based application... Yes, you may use C++ to write the server side backend which would generate your pages. But it is not recommended as C++ is not suitable for sandboxes environment and posses a major security risk. Just imagine if you open a website and it contains a c++ program with major memory leaks.
19th May 2020, 2:59 PM
Arsenic
Arsenic - avatar
+ 5
At the very least, you need to use HTML and CSS to construct a very basic website. However, I presume you mean create a dynamic web application for your website, too. Common languages used for this purpose include PHP, Java, and Python. You can use C++, as well. There are several good C++ web frameworks or libraries.
19th May 2020, 3:13 PM
Tarun Kumar
Tarun Kumar - avatar
+ 4
The other answers are already pretty good but I'd like to add some more details. Nowadays you can write both frontend and backend in C++. Wasm allows you to run C++ like JavaScript in the web browser. And C++ is obviously a decent choice for backend as well, except that you might have some security problems. I can however recommend you Rust, a relatively new system programming language like C++. It's as fast as C++ (so a lot faster than JS, PHP, Java or Python), runs on front- and backend, is super secure by design, has a great ecosystem and is really fun to code (it has been the most loved language for four years now).
19th May 2020, 3:27 PM
Aaron Eberhardt
Aaron Eberhardt - avatar
0
The order is the best
20th May 2020, 4:34 AM
Hariom Budhauliya
Hariom Budhauliya - avatar