Hello, I am creating a program that will read all lines in a file until EOF and when I enter the code that will terminate the program names in a file it shows an error, The error is below
1 2 3 4 5 6 7
Compiling...
main.cpp
D:\xxxxxxx\main.cpp(41) : error C2664: 'KillProcessByName' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
xxxxxxx.exe - 1 error(s), 0 warning(s)
assuming you are using a std::string you need to look in to std::string.c_str() function of the std::string class. Using it would eliminate your problem if used properly.
Are you sure you are using VC6? The stl wasn't part of vc6.