Home News Examples Demo Downloads FAQ Documentation Mailing Lists License
Support GeSHi!
If you're using GeSHi, why not help GeSHi out? You can link to GeSHi with this image:
Powered by GeSHi
Get the HTML

Project Status
The latest stable version of GeSHi is, released on the 19th of Aug, 2012.

Supported Languages:
*Apache Log
*APT sources.list
*ASM (m68k)
*ASM (pic16)
*ASM (x86)
*ASM (z80)
*Backus-Naur form
*C for Macs
*C++ (with QT)
*Diff File Format
*DOT language
*FourJ's Genero
*INI (Config Files)
*Java 5
*KLone C & C++
*Objective C
*OpenOffice BASIC
*Oracle 8 & 11 SQL
*Pixel Bender
*Progress (OpenEdge ABL)
*Ruby on Rails
*Uno IDL
*VIM Script
*Visual BASIC
*Visual Fox Pro
*Visual Prolog
*Windows Registry Files

GeSHi is the current stable release, with eighteen new languages and bug fixes over the last release.

GeSHi 1.1.2alpha5 is the current latest version from the development branch, with full C support (see the GeSHi development website).
Mailing Lists
HomeNewsExamplesDemoDownloadsFAQDocumentationMailing ListsLicense 
3:58 pm GMT

GeSHi - Generic Syntax Highlighter


Latest News

News Archive

Random Screenshot

[small1.png: Click for a larger view]



Runtime Example

#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;

bool lessThan20Function(int value)
    return value < 20;

class LessThan20 {
    bool operator() (int value) const
        return value < 20;

int main() {

    int iarr[10] = {2,4,55,6,66,10,22,14,70,1234};
    vector<int> v1(iarr, iarr+10);

    LessThan20 lt20;

    // count_if(start_iterator, end_iterator, predicate);

    // Pointer to a function as argument
    int count1 = count_if(v1.begin(), v1.end(), &lessThan20Function);
    cout << "There are " << count1 << " values less than 20" << endl;

    // Function object as argument
    int count2 = count_if(v1.begin(), v1.end(), lt20);
    cout << "There are " << count2 << " values less than 20" << endl;

    return 0;