Title: Problem when posting source code
Last modified: August 22, 2016

---

# Problem when posting source code

 *  [quents](https://wordpress.org/support/users/quents/)
 * (@quents)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/problem-when-posting-source-code-1/)
 * Hi,
 * When I try to add a source code to my post like the following piece of code, 
   It doesn’t work and
 * [code language="cpp"]
    #include <iostream> #include <string> #include <fstream
   > #include <vector> #include <sstream> using namespace std; struct FileRead{ 
   void readFromFile(); vector<vector<string>> person; }; [/code]
 * It views the code like that:
 * [https://www.dropbox.com/s/mun1rcgtfqhlzcj/wordpress.png?dl=0](https://www.dropbox.com/s/mun1rcgtfqhlzcj/wordpress.png?dl=0)
 * How can I solve this issue?
 * Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [petercralen](https://wordpress.org/support/users/petercralen/)
 * (@petercralen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/problem-when-posting-source-code-1/#post-5632973)
 * Hi,
 * How do you insert that code to post ?
    Do you use ”Pre” as format ?
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/problem-when-posting-source-code-1/#post-5633202)
 * This Codex article might help: [http://codex.wordpress.org/Writing_Code_in_Your_Posts](http://codex.wordpress.org/Writing_Code_in_Your_Posts)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem when posting source code’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [source-code](https://wordpress.org/support/topic-tag/source-code/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/problem-when-posting-source-code-1/#post-5633202)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
