char exe_str[]="find E:\sid -name 'sid.txt' -print";

How do i make find command here interactive...

1st. Accept the Drive letter from user
2nd Accept the file name from user


thanks..

Recommended Answers

All 2 Replies

read the information using scanf/cin and then create the command using them.

read the information using scanf/cin and then create the command using them.

There is no cin in C.

Use scanf to read user input as dkalita suggested.
Use sprintf to create the execution string based on user input.

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.