// ConsoleApp.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int fun(bool x,int y[],int length);
int funx(char y[]);
int functionx(bool IsMainProd, int MainProdId, int Addons[],int len);
int _tmain(int argc, _TCHAR* argv[])
{
int AddonCancel[10];
for( int i = 0 ; i<4 ;++i)
{
std::fill(std::begin(AddonCancel)+i,std::begin(AddonCancel)+i+1,i*5);
}
bool IsMainProduct (false);
int MainProduct =4 ;
functionx(IsMainProduct,MainProduct,AddonCancel,4);
}
int functionx(bool IsMainProd, int MainProdId, int Addons[],int len)
{
if(IsMainProd)
std::cout<< "Is Main Product";
else
{
for(int x = 0 ; x<len;++x)
{
std::cout<< Addons[x];
}
}
return 0 ;
}