Invalid conversion

On line eight I am receiving the error 'invalid conversion from 'char' to 'const char*'.

1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef VALIDATE_HPP_INCLUDED
#define VALIDATE_HPP_INCLUDED
#include <cstdlib>
void validate(int moose[], int wolves[], int argc, char argv[])
{
    if(argc == 3)
    {
        wolves[0] = std::atoi(argv[1]);
        moose[0] = std::atoi(argv[2]);
    }
}

#endif 
void validate(int moose[], int wolves[], int argc, char argv[])

It should be :
void validate(int moose[], int wolves[], int argc, char *argv[])
Thank you.
Last edited on
Topic archived. No new replies allowed.