I started to use QT data plugin as starting point for my Data Plugin.
I am using VS2015. converted the project to VS 2015. it is showing the following errors.
iStart unidentified.
iSymbol unidnetified
Both the variables were used in a For loop and are used outside the for loop.
Whether I need to declare the same as global variable ?
struct RecentInfo *FindOrAddRecentInfo( LPCTSTR pszTicker )
{
struct RecentInfo *ri = NULL;
if( g_aInfos == NULL ) return NULL;
for( int iSymbol = 0; g_aInfos && iSymbol < RecentInfoSize && g_aInfos[ iSymbol ].Name && g_aInfos[ iSymbol ].Name[ 0 ]; iSymbol++ )
{
if( ! stricmp( g_aInfos[ iSymbol ].Name, pszTicker ) )
{
ri = &g_aInfos[ iSymbol ];
return ri; // already exists - do not need to add anything
}
}
if( iSymbol < g_nSymbolLimit )
{
if( AddToQTPortfolio( pszTicker ) )
{
GrowRecentInfoIfNecessary( iSymbol );
ri = &g_aInfos[ iSymbol ];
strcpy( ri->Name, pszTicker );
ri->nStatus = 0;
}
}
return ri;
}