dimanche 20 septembre 2020

How to display c++ code snippets on websites and upload codes

I am creating a website where I want to display various C++ programs in code snippet blocks on different pages. But I am pretty new to web development scene. So I have 2 questions.

  1. How can I display code snippets in code blocks, just like you have in programming websites?

  2. I have a lot of .cpp files ready with codes written in proper format(indentation, lining, etc). Is there any way I can upload those files individually and browser automatically displays it in the same format as inside the file, or I need to do copy paste content of a file inside a page and do formatting manually?

My question might be a little vague. Please ask me more details in case of any query.




Aucun commentaire:

Enregistrer un commentaire