Showing results for 
Search instead for 
Did you mean: 
Create a Post
Not applicable

How to add code to a document

There is a very simple way to add pieces of code to documents.



On the right side of the editor toolbar there is a shy looking >> icon. It actually has some powerful features.



Use it to choose the type of code to add and paste the code.


#include <iostream>  using namespace std;  int main() {   for ( int x = 0; x < 128; x++ ) {   cout<< x <<". "<< (char)x <<" ";    //Note the use of the int version of x to    // output a number and the use of (char) to    // typecast the x into a character   // which outputs the ASCII character that    // corresponds to the current number   }   cin.get(); }  


this is an example of a C++ code



0 Kudos