Why the array can't printed in the port monitor?

#define PORT_MONITOR_VELOCITY 9600
#define INP_0 0
#define BATTARY_AMOUNT 5

enum BattaryCurrConditionType{Charge, Discharge};

struct BattaryInfoType
{
  int Days;
  int Hours;
  int Minutes;
  int Seconds;
  int Milliseconds;
  BattaryCurrConditionType BattaryCurrCondition;    
};

void setup();
void initBattariesArray(BattaryInfoType*);
void printBattariesArray(BattaryInfoType*);

int main()
{
  setup();
  BattaryInfoType BattariesArray[BATTARY_AMOUNT];
  initBattariesArray(BattariesArray);
  printBattariesArray(BattariesArray);
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(PORT_MONITOR_VELOCITY);
}

void initBattariesArray(BattaryInfoType* BattariesArray)
{
  for(int currBattary = INP_0; currBattary <= BATTARY_AMOUNT - 1; currBattary++)
  {
    BattariesArray[currBattary].Days = 0;
    BattariesArray[currBattary].Hours = 0;
    BattariesArray[currBattary].Minutes = 0;
    BattariesArray[currBattary].Seconds = 0;
    BattariesArray[currBattary].Milliseconds = 0;
    BattariesArray[currBattary].BattaryCurrCondition = Charge;
  }
}

void printBattariesArray(BattaryInfoType* BattariesArray)
{
  for(int currBattary = INP_0; currBattary <= BATTARY_AMOUNT - 1; currBattary++)
  {
    Serial.print("Time of discharging of battary number ");
    Serial.print(currBattary);
    Serial.print(" is ");
    Serial.print(BattariesArray[currBattary].Days);
    Serial.print(":");
    Serial.print(BattariesArray[currBattary].Hours);
    Serial.print(":");
    Serial.print(BattariesArray[currBattary].Minutes);
    Serial.print(":");
    Serial.print(BattariesArray[currBattary].Seconds);
    Serial.print(":");
    Serial.println(BattariesArray[currBattary].Milliseconds);
    delay(1000);
  }
}

Why the array can’t printed in the port monitor?

You forgot to call init() in your main(), but I suggest you don't use main() and put your code in setup() instead (without the recursive call to setup(), of course...). And it's "battery" :wink:

struct BattaryInfoType
{
  int Days;
  int Hours;
  int Minutes;
  int Seconds;
  int Milliseconds;
  BattaryCurrConditionType BattaryCurrCondition;   
};

What universe do you live in where negative values for days, hours, etc. need to be supported?
What universe do you live in where the number of seconds in a minute needs an int for storage?

Using the smallest meaningful type for variables is a good habit to get into from the beginning.

Don't use signed types when negative values are meaningless. Don't use int when byte will do.

BATTARY_AMOUNT

I have no clue what 5 as the value associated with this name means. BATTERY_COUNT, on the other hand, is not only spelled correctly, but has a meaningful name.

Tell me why is is necessary to pass global arrays to functions.