Download MetaTrader 5

Wondering about class names?

To add comments, please log in or register
compojoom
42
compojoom  

I got a book about programing EA. In the examples most of the created classes are prefixed with a C. CTrade, CTimer etc. I thought that this is a convention the author of the book decided to use for his book, but when I browsed the Include folder I see that most of the classes are names with a C. CObject, CString.

What does the C stand for in the class name?

Drazen Penic
2730
Drazen Penic  

You are right. It's just a convention.

There is no real requirement to start a class name with "C", but Metaquotes' developers decided to prefix all class names with a "C" to make it easier to differentiate class names (types) from variable names.

compojoom
42
compojoom  
Ah, ok. So C standard for Class?
Ex Ovo Omnia
3389
Ex Ovo Omnia  
compojoom:
Ah, ok. So C standard for Class?

Very probably. There are multiple conventions (or standards) in naming classes, members, variables, methods and formatting sources. It was very useful in team development to keep uniformity. Your private code has no such requirements.

To add comments, please log in or register