Hello, Thanks for sharing your implementation However, I cannot compile the program on my computer, I am on Ubuntu 20.04 Here is the error message : ``` graphlet_utils.cpp: In function ‘bool fexists(const char*)’: graphlet_utils.cpp:42:12: error: cannot convert ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘bool’ in return 42 | return ifile; | ^~~~~ make: *** [Makefile:47: pgd] Error 1 ``` Thank you for your help
Activity
[-]Cannot compile[/-][+]Error in compilation[/+]lunaticbg commentedon Jul 23, 2021
Do you solve this problem? I also met the bug ...
lunaticbg commentedon Jul 26, 2021
I solved it with change the type of ifile into static_cast(ifile);
TerryLee77 commentedon Aug 13, 2021
But I still met the bug after change the type.And here is the erroe message``
I tried. But after that I still have problem.And the Error message:
collect2: error: ld returned 1 exit status make: *** [Makefile:47:pgd] Error 1DRealHammer commentedon Nov 18, 2021
is maybe a bit weird and seems not to work
as the function is only used to verify, if a file exists and can be accessed:
we can just change it to the statement
return ifile.is_open();works for compiling so far