Convert Linux code to Windows

O

ose

How to convert the "while" stetement in the following code from Linux to run
on Windows?

while((c= getopt(argc, argv, "i:eek::x:c:lkh")) != -1)
{
switch(c)
{
case 'g':
...
case 'h'
...
default: break;
}
}
 
M

Martien Verbruggen

How to convert the "while" stetement in the following code from Linux to run
on Windows?

I'm assuming that your real question is where to get a copy of getopt
that you can use on windows?

You should probably ask this on a windows group, or maybe one specific
even to your compiler, because it might already be included in there
somewhere. For example in the cygwin environment on windows it's
available.

Failing that, there are many free implementations of getopt available
online. If you search in Google for

getopt implementation windows

many interesting links pop up. The third one, at bytes.com, looks the
most promising.

Have you tried Google yet? it's pretty useful for these sorts of things.

Martien
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top