C isn't C++
its not DBP with the availability of C++ stuff, its C++ stuff that can access the same commands in DBPro.
Any time you would use a DBPro native function, you just have a db prefix. Any time you would use anything else, you do it in C++. The biggest problems for me switching straight from DBPro to C++ were:
There's no primitive "string". There's just an array of chars. (a char is a byte representing an ascii character)
Arrays are of fixed size - which means inserting anything requires deleting the array and creating a new one - to do this you deallocate then allocate the memory.
The concept of a "global" is a bit different, as variable scope is important.
All variables have to be explicitly declared.
Include files and compiler options have to be taken into account.
There is no strict equivalent of a UDT (Generally "struct"s are used, but those can have methods and properties same as a class)
...and that's stuff just to convert straight DBP to C++/DGDK. The real cool stuff in C++ comes with Object Oriented Programming. For example, If you have the following declaration of a class called "vector2":
class vector2
{
public:
float x;
float y;
vector2();
vector2(const float& a,const float& b);
vector2 operator+ (const vector2& b); //vector addition
vector2& operator+= (const vector2& b);
vector2 operator- (const vector2& b); //vector subtraction
vector2& operator-= (const vector2& b);
vector2 operator* (const float& b); //vector scalar multiplication
vector2& operator*= (const float& b);
vector2 operator/ (const float& b); //vector scalar division
vector2& operator/= (const float& b);
float operator* (const vector2& b); //dot product
void normalize();
void normalize(const float& dist);
vector2 normalized();
vector2 normalized(const float& dist);
float length();
};
If you had a vector2 called "ABG", you could say this:
vector2 MyNewVector2=ABG.normalized();
Of course, it's too much to handle just having stuff thrown at you like I'm doing
Try taking a look at some code you've already written, and try converting that code and compiling it.