I started a C++ class about 2 weeks ago. In the class I use Linux and I can get stuff to work, but at home I have WindowsXP pro and I don't know how to make anything work. I wrote this simple code that tells you your travel efficiency:#include
cout << "How many miles did you travel? ";
cin >> milestraveled;
cout << "How many gallons of gas did you use? ";
cin >> gallonsused;
cout >> "How much gas does one gallon of gas cost? $";
cin >> pricepergallon;
milespergallon = milestraveled / gallonsused;
pricepermile = pricepergallon / milespergallon;
cout << "You got " << milespergallon << " miles per gallon,
cout << "and each mile cost $" << pricepermile << '
I can't get it to compile. It works just fine when I use this in Linux. What do I have to do differently with windows to make it work? After I get it to work how can I run it to see if it works. In linux I just type ./travel to make it work. I'm guessing that I have to use command prompt, but I don't know the commands. Is there somewhere I can go to find a tutorial to make my code a clickable executable file like a batch or something? I have been using devc++ for compiling.