Home
Forums
New posts
Search forums
Online Courses
2021 Rankings
2021 MFE Programs Rankings Methodology
Reviews
Latest reviews
Search resources
Tracker
What's new
New posts
New media
New media comments
New resources
New profile posts
Latest activity
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
C++ Programming for Financial Engineering
Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering.
Learn more
Join!
Python for Finance with Intro to Data Science
Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job.
Learn more
Join!
An Intuition-Based Options Primer for FE
Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models.
Learn more
Join!
Home
Forums
Quant discussion
Computing
How to display C++ code and math beautifully
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Andy Nguyen" data-source="post: 70444" data-attributes="member: 1"><p>Just a note for the members who currently taking our online C++ course but it would be useful for many people as well.</p><ul> <li data-xf-list-type="ul"><strong>Code highlighter</strong></li> </ul><p>Many people are used to [plain][code]your code[/code][/plain] but you can use [plain][code=csharp]your code here[/code][/plain] and paste the text code from some editor onto Quantnet. Here is how it will look using C++ language.</p><p>[code]// Hello.cpp</p><p>//</p><p>// Simple example of function bodies.</p><p>//</p><p></p><p>// Preprocessor for include files</p><p>#include <stdio.h> // C style I/O</p><p>#include <iostream> // C++ style I/O using operator overloading</p><p>using namespace std; // The C++ logical collection of functions</p><p></p><p>void hello_C()</p><p>{</p><p>printf("Hello Quantnet, C style\n");</p><p>}</p><p></p><p>void hello_CPP()</p><p>{</p><p>// Using (binary) operator overloading</p><p>cout << "Hello Quantnet, C++ style \n";</p><p>}[/code]</p><p>You can specify up to 201 languages such as csharp, java, sql, php, etc</p><ul> <li data-xf-list-type="ul"><strong>Latex</strong></li> </ul><p>To display mathematical formula nicely on Quantnet, you can use [plain]\(latex-code\)[/plain]</p><p>[plain]\(\large e^x=\sum_{n=0}^\infty\frac{x^n}{n!}\)[/plain] will give me \(\large e^x=\sum_{n=0}^\infty\frac{x^n}{n!}\)</p></blockquote><p></p>
[QUOTE="Andy Nguyen, post: 70444, member: 1"] Just a note for the members who currently taking our online C++ course but it would be useful for many people as well. [LIST] [*][B]Code highlighter[/B] [/LIST] Many people are used to [plain][code]your code[/code][/plain] but you can use [plain][code=csharp]your code here[/code][/plain] and paste the text code from some editor onto Quantnet. Here is how it will look using C++ language. [code]// Hello.cpp // // Simple example of function bodies. // // Preprocessor for include files #include <stdio.h> // C style I/O #include <iostream> // C++ style I/O using operator overloading using namespace std; // The C++ logical collection of functions void hello_C() { printf("Hello Quantnet, C style\n"); } void hello_CPP() { // Using (binary) operator overloading cout << "Hello Quantnet, C++ style \n"; }[/code] You can specify up to 201 languages such as csharp, java, sql, php, etc [LIST] [*][B]Latex[/B] [/LIST] To display mathematical formula nicely on Quantnet, you can use [plain]\(latex-code\)[/plain] [plain]\(\large e^x=\sum_{n=0}^\infty\frac{x^n}{n!}\)[/plain] will give me \(\large e^x=\sum_{n=0}^\infty\frac{x^n}{n!}\) [/QUOTE]
Verification
Post reply
Home
Forums
Quant discussion
Computing
How to display C++ code and math beautifully
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top