Page 1 of 1

Visual C++ express 2010

Posted: Thu Oct 27, 2011 8:09 am
by fftremblay
Hi everyone,

I am a newbie trying to program a strategy for Forex Tester. I was following the following tutorial "http://www.forextester.com/forum/viewtopic.php?t=1013" but when I am trying to build the solution, I am getting the following error messages:

warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
error C2572: 'ObjectsDeleteAll'
error C2144: syntax error
error C4430: missing variable type

Thanks for your help.

Cheers

Posted: Thu Oct 27, 2011 5:44 pm
by FT Support
Hello,

To fix this problem please change this code line:

Code: Select all

void ObjectsDeleteAll(int window = 0, TObjectType ObjType)

with this code line:

Code: Select all

void ObjectsDeleteAll(int window = 0, TObjectType ObjType = obj_AnyObject)

It should help

Posted: Fri Oct 28, 2011 12:01 pm
by fftremblay
Hello,

Thanks for your help. However, I checked and the code was already the right one (i.e. void ObjectsDeleteAll(int window = 0, TObjectType ObjType = obj_AnyObject);)

Any other ideas on what could be the cause of the problem.

Thanks.

Cheers

Posted: Sat Oct 29, 2011 5:42 pm
by FT Support
Hello,

Please clarify what concrete line is highlighted by the compiler. Where does it see the error?

Posted: Mon Oct 31, 2011 3:31 am
by fftremblay
Hi,

1) First errors/warnings is in the strategyinterfaceunit.h file

strcpy(dest, source);

strategyinterfaceunit.h(1083): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Same errors on lines 1579 and 1580

2) strategyinterfaceunit.h(1692): error C2572:

'ObjectsDeleteAll' : redefinition of default parameter : parameter 2
'ObjectsDeleteAll' : redefinition of default parameter : parameter 1

Thank you

Posted: Mon Oct 31, 2011 10:25 am
by FT Support
Hello,

Please try to use such code:
void ObjectsDeleteAll(int window, TObjectType ObjType);

Does it help?

Posted: Mon Oct 31, 2011 5:41 pm
by fftremblay
It worked - thanks a lot

Re: Visual C++ express 2010

Posted: Thu Nov 20, 2014 5:24 am
by jacksjack
thanx...