Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to pass values to main function (vs2015,opencv,c++)

if i have downloaded the code from somewhere lets say its abc.cpp and its having main as :

int main(int argc, char* argv[])
{
    Mat image;
    if (argc>1)
        image = imread(argv[1]);
    else
    {
        cout << "    Usage: " << argv[0] << " <input_image> [<gt_word1> ... <gt_wordN>]" << endl;
        return(0);
    }}


how should i run this code ?? normally from the vs platform??? how to pass the image to be read????

how can we give values to argc or argv??? i have gone thru all the other similar questions here but dint found any solution to my problem??