Library iostream
should stay in the files. The problem is with extension of code files - it should be .cpp
, not .c
. You don't need to remove iostream
. But then use other command to compile+link, not:
cl perfdata.c -o perfdata -lpdh
but use this one:
cl perfdata.cpp /link pdh.lib
(That's an example)