Here's code I tried to highlight:
Code:
#pragma once
#include<iostream>
#include<string>
/* Multi-line comment begins here
And ends here*/
#ifdef __BORLANDC__
#error "Borland"
#else if defined(_MSC_VER)
#error "Microsoft"
#endif
using /*midline comment*/namespace std;
int main()
{
string mysentence = "hello bool world";
cout << mysentence << endl;
cout << "welcome to my world" << end;
return 0;
}
And here's how it was highlighted:
Code:
#pragma once
#include<iostream>
#include<string>
/* Multi-line comment begins here
And ends here*/
#ifdef __BORLANDC__
#error "Borland"
#else if defined(_MSC_VER)
#error "Microsoft"
#endif
using /*midline comment*/namespace std;
int main()
{
string mysentence = "hello bool world";
cout << mysentence << endl;
cout << "welcome to my world" << end;
return 0;
}
But here's how it should look:
Code:
#pragma once
#include<iostream>
#include<string>
/* Multi-line comment begins here
And ends here*/
#ifdef __BORLANDC__
#error "Borland"
#else if defined(_MSC_VER)
#error "Microsoft"
#endif
using /*midline comment*/namespace std;
int main()
{
string mysentence = "hello bool world";
cout << mysentence << endl;
cout << "welcome to my world" << end;
return 0;
}
You've made a good start, but there are a few quirky things and other more obvious things that you need to work out. Fyi, the proper highlighting was done with my codeformatter program (the source is available on my app page if you're at all interested in referencing it).