<< operator error syntax near cin "endl"

#include<iostream>
#include <string>
#include<iomanip>

using namespace std;

int main() {
//setting up numeral input
double loan_Payment;
double insurance;
double gas;
double oil;
double tires;
double maintenance;
double total;
double yearly_Total;
double percent_of_10;
double grand_Total;

//setting up text input
std::cout.width(30); std::cout << std::left << "Loan Payment";
std::cin.width(15); std::cin >> std::right >> loan_Payment << std::endl;









}
Last edited on
Cin loads data into variables, endl is used when you want to print a new line.
You can use endl with cout, not with cin.

Edit:
Forgot to mention std::cin >> std::right does nothing
Last edited on
Topic archived. No new replies allowed.