Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/24/26 01:52
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
No connection to MT4
by JeyKey II. 10/22/26 15:33
Zorro tutorial ideas?
by mistery. 10/21/26 05:28
Avoid "log\ - delete old files" message
by Martin_HH. 10/20/26 07:23
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 7,375 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: C++ scripts [Re: jcl] #486134
06/10/22 15:05
06/10/22 15:05
Joined: Feb 2017
Posts: 1,836
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,836
Chicago
For the curious, the Zorro default C++ compiler options do not override struct alignment.

Code
#include <zorro.h>

typedef struct FOO1{
	char a;
	double b;
} FOO1;
#pragma pack(push,1)
typedef struct FOO2{
	char a;
	double b;
} FOO2;
#pragma pack(pop)

DLLFUNC void main() {
	set(LOGFILE);
	FOO1 foo1={};
	FOO2 foo2={};
	char *pA=0,*pB=0;
	pA = (char*)&foo1.a;
	pB = (char*)&foo1.b;
	printf("\nA: %p, B: %p, diff: %d",pA,pB,pB-pA);
	pA = (char*)&foo2.a;
	pB = (char*)&foo2.b;
	printf("\nA: %p, B: %p, diff: %d",pA,pB,pB-pA);
	printf("\nDone!");
}

/* LOG OUTPUT:

A: 0000006041F0B280, B: 0000006041F0B288, diff: 8
A: 0000006041F0B270, B: 0000006041F0B271, diff: 1
Done!

*/

Re: C++ scripts [Re: jcl] #486241
07/02/22 13:02
07/02/22 13:02
Joined: Feb 2017
Posts: 1,836
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,836
Chicago
Miscellaneous C++ problems:

1) cancelTrade is missing the overload where TRADE* is an argument.

2) distribute() function is missing. (but we do have distribute0 and distribute1.)

Re: C++ scripts [Re: jcl] #486242
07/04/22 13:02
07/04/22 13:02
Joined: Jul 2000
Posts: 28,142
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 28,142
Frankfurt
Thanks, this will be fixed in the next beta. Please continue to test.

Page 2 of 2 1 2

Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1