hi,
In Windows operating system this problem is caused because of spaces in the directory path name.
C:\test\someText.txt does not have any spaces in it but
D:\My programming code\programing code c++\1-algorithm\Huffman code has lot of spaces like between My and programming.
You can either put the path in double quotes like suggested in solution 1
OR
go for the
Short path of the directory[
^]. This API will get you the short path of the directory which will look like
"D:\My ~1"
On linux i am not sure if such APIs are available so please Google for it.
hope this helps !!