Visual C++ express 2010

Examples step by step how to make your own automated strategy or user indicator
Message
Author
fftremblay
Posts: 4
Joined: Thu Oct 27, 2011 8:01 am

Visual C++ express 2010

#1 Postby fftremblay » Thu Oct 27, 2011 8:09 am

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

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#2 Postby FT Support » Thu Oct 27, 2011 5:44 pm

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
Check our other product here:
http://www.forexcopier.com

fftremblay
Posts: 4
Joined: Thu Oct 27, 2011 8:01 am

#3 Postby fftremblay » Fri Oct 28, 2011 12:01 pm

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

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#4 Postby FT Support » Sat Oct 29, 2011 5:42 pm

Hello,

Please clarify what concrete line is highlighted by the compiler. Where does it see the error?
Check our other product here:
http://www.forexcopier.com

fftremblay
Posts: 4
Joined: Thu Oct 27, 2011 8:01 am

#5 Postby fftremblay » Mon Oct 31, 2011 3:31 am

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

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#6 Postby FT Support » Mon Oct 31, 2011 10:25 am

Hello,

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

Does it help?
Check our other product here:
http://www.forexcopier.com

fftremblay
Posts: 4
Joined: Thu Oct 27, 2011 8:01 am

#7 Postby fftremblay » Mon Oct 31, 2011 5:41 pm

It worked - thanks a lot

jacksjack
Posts: 1
Joined: Thu Nov 13, 2014 5:22 am

Re: Visual C++ express 2010

#8 Postby jacksjack » Thu Nov 20, 2014 5:24 am

thanx...


Return to “Programming lessons”

Who is online

Users browsing this forum: No registered users and 20 guests