I am creating a new folder with user defined name to it and I want to store image in that folder I tried this
string foldername;
Mat frame = imread("D:\\Sample\\ag.jpg", 1);
cout << "Enter Name of folder:";
getline(cin, foldername);
CreateDirectory(("D:\\Sample\\" + foldername).c_str(), NULL);
imwrite(("D:\\Sample\\" + foldername).c_str() + "A.jpeg", frame);
but the code is not working what,changes do I need to do in order to save the image in that folder name?
thankyou!
↧