Reputation: 11
I installed CImg
to load the image (Visual Studio 2019). I wanted to get my picture, but no matter how I indicate the path to the picture, CImg
does not see it.
My code:
#include "neural_network.h"
#include "CImg/CImg.h"
#include "PictureStream.h"
#include "PixelMatrix.h"
using namespace cimg_library;
int main() {
neural_network my_Network;
CImg<double> image("C:\\pic.bmp");
my_Network.setImg(image);
my_Network.showImg();
}
I would be very grateful for your help!
Upvotes: 1
Views: 326
Reputation: 16
You need two consecutive backslash in your string, but in C/C++, writing two backslashs in a string means a single backslash, so you have to double it:
CImg<double> image("C:\\\\pic.bmp");
Upvotes: 0