I am working on getting a string into this function but there are already to many arguments.

char interface[10];
	if (!(in = popen("iwlist %s scan","r"))) /*Need interface string here */
	{
		/*to be added */
	}

I tried to add ",interface" after "r" but it said to many arguments. I also tried adding it in a few other places.

Thanks in advance.

Make the string separately using sprintf or the like.

[edit]Make sure your destination has enough room for the text you want in it.

Worked perfectly. Thank you very much.