Types blitz3d to c++?

Blitz3D Forums/Blitz3D Programming/Types blitz3d to c++?

Caton(Posted 2016) [#1]
Type obj
Field speed#
End Type


I know I use for speed to use
float speed=0f;

but for defining type not sure.

How would do this code in c++?

and what blitz basics match c++ basics?


Kryzon(Posted 2016) [#2]
If you expect to learn C++ out of forum posts you are going to have a lot of difficulty.

In C++ you can use struct or class as data structures equivalent to blitz's Type.
The main resource I used to learn C++ is this, it's concise enough that it doesn't get boring. I recommend it:
http://www.cplusplus.com/doc/tutorial/

You just need patience and dedication to go through that, little by little.
Stackoverflow is also going to help you, it has some classic questions with great answers.


Kryzon(Posted 2016) [#3]
class Obj
{
public:
	float speed;

	Obj() : speed( 0.0f ) {}
};