Please suggest why is it giving a run time error as "non portable type conversion"


ptr=popen(system(command),"r");


what should be done?


thanks

system() returns an integer, but popen()'s first argument expects a string. What should be done depends on what you want to happen, but Ed would guess this:

ptr = popen(command, "r");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.