Question

in c++ coding what does it mean when for #include <iostream> it says 'iostream' file not...

in c++ coding what does it mean when for #include <iostream> it says 'iostream' file not found? here is my code

This is where it gives me that error message

#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <limits>
using namespace std;
void get_input(int& month, int& day, int& year);
// post-condition: get the input of a date. If the date is NOT valid, will prompt the user to reenter a valid date
// I really like the overloading of the functions - I wish I would have thought about
// how obvious that was when I was writing Project 5!
void get_input(int& month, int& year);
// post-condition: get the input of a month. If the month is NOT valid, will prompt the user to reenter a valid month
void get_input(int& year);
// post-condition: get the input of a year. If the date is NOT valid, will prompt the user to reenter a valid year.
// the year must be later than 1582 in order to be valid.
bool isValid(int month, int day, int year);
// post-condition: return true if the specified date is valid, false otherwise
bool isValid(int month, int year);
// post-condition: return if the specified month is valid, false othewise
bool isValid(int year);
// post-condition: return true if the given year is valid. false otherwise.
// the given year is valid if it is later than year 1582.
void print_calendar(int month, int day, int year);
// pre-condition: the date is a valid date
// post-condition: print out the day of week for specified date. For example, print_calendar(10, 15, 2014) will print out
// October 15, 2014 is Wednesday
void print_calendar(int month, int year);
// pre-condition: the month is a valid month, and the year is a valid year
// post-condition: print out the calendar of specified month
void print_calendar(int year);
// pre-condition: the year is a valid year
// post-condition: print out the calendar of specified year
string monthName(int month);
// pre-condition: the month value is 1, 2, .., 12
// post-condition: return a string that represents the name of the month. If month is 1, the name is "January" and so on

Homework Answers

Answer #1

Step 1 : Check the name of the file or Program. The extension should be .CPP and NOT .c

Step 1: In case the file has an extension of .c . Please rename the file from the file menu and ensure it has the extension of .CPP

Step 3: Compile the program again with this new file extension (.CPP) and it should work.

Note: <iostream> is a header file and part of the C++ standard library so <iostream> only works with C++ language programs and will not work with C programs.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What is my code missing? #include <iostream> #include <string> using namespace std; const double PI =...
What is my code missing? #include <iostream> #include <string> using namespace std; const double PI = 3.141592; const int LEGAL_AGE = 21; int main() {    double radius;   // input variable holds radius of circle    int age;       // input variable holds age of user    string name;       // input variable holds first name of user    // prompt user for radius    cout << "Please enter the radius of your circle: ";    cin >> radius;   ...
can someone edit my c++ code where it will output to a file. I am currently...
can someone edit my c++ code where it will output to a file. I am currently using xcode. #include <iostream> #include <cctype> #include <cstring> #include <fstream> using namespace std; bool inputNum(int [],int&,istream&); void multiply(int[],int,int[],int,int[],int&); void print(int[],int,int,int); int main() {ifstream input; int num1[35],num2[35],len1,len2,num3[60],len3=10,i; input.open("multiplyV2.txt"); //open file if(input.fail()) //is it ok? { cout<<"file did not open please check it\n"; system("pause"); return 1; }    while(inputNum(num1,len1,input)) {inputNum(num2,len2,input); multiply(num1,len1,num2,len2,num3,len3); print(num1,len1,len3,1); print(num2,len2,len3,2); for(i=0;i<len3;i++) cout<<"-"; cout<<endl; print(num3,len3,len3,1); //cout<<len1<<" "<<len2<<" "<<len3<<endl; cout<<endl;    } system("pause"); } void...
Complete the missing code for the constructors as indicated in the comments in all three header...
Complete the missing code for the constructors as indicated in the comments in all three header files. C++ mainDriver.cpp #include <string> #include "Address.h" #include "Date.h" #include "Person.h" using namespace std; int main() {    Person p1;    Person p2("Smith", "Bobby", "[email protected]", 111, "Main St", "Clemson",            "SC", 29630, 1, 31, 1998);    cout << endl << endl;    p1.printInfo();    p2.printInfo();    return 0; } Person.h #ifndef PERSON_H #define PERSON_H #include <iostream> #include <string> using namespace std; class...
/* Program Name: BadDate.java Function: This program determines if a date entered by the user is...
/* Program Name: BadDate.java Function: This program determines if a date entered by the user is valid. Input: Interactive Output: Valid date is printed or user is alerted that an invalid date was entered. */ import java.util.Scanner; public class BadDate { public static void main(String args[]) { // Declare variables Scanner userInput = new Scanner (System.in); String yearString; String monthString; String dayString; int year; int month; int day; boolean validDate = true; final int MIN_YEAR = 0, MIN_MONTH = 1,...
C++ Please and thank you. I will upvote Read the following problem, and answer questions. #include<iostream>...
C++ Please and thank you. I will upvote Read the following problem, and answer questions. #include<iostream> using namespace std; void shownumbers(int, int); int main() { int x, y; cout << "Enter first number : "; cin >> x; cout << "Enter second number : "; cin >> y; shownumbers(x, y); return 0; } void shownumbers(int a, int b) { bool flag; for (int i = a + 1; i <= b; i++) { flag = false; for (int j =...
C++ See the provided specification files. Complete the implementation for each as a separate file. void...
C++ See the provided specification files. Complete the implementation for each as a separate file. void seen(std::string); If there is already a Word object in the Words list, then the number of occurrences for this word is incremented. If there is no Word object for this word already, create a new word object with occurrence =1, and insert this object into the list of Word objects. std::string getNextWord(); Returns the next word of the list and sets the currentItem pointer...
I am trying to print out an 8 by 8 "chess board". My first step is...
I am trying to print out an 8 by 8 "chess board". My first step is to set all values in the board to 0. I made a function to do so but it isn't working, and i can't figure out why. I'm trying to, for now, simply print out an 8 by 8 of zero values. This is what I have: (C++) // set all of board to 0 as a function // bool function to check for valid...
C++ #include<iostream> #include<string> #include<fstream> #include<cstdlib> using namespace std; const int ROWS = 8; //for rows in...
C++ #include<iostream> #include<string> #include<fstream> #include<cstdlib> using namespace std; const int ROWS = 8; //for rows in airplane const int COLS = 4; void menu(); //displays options void displaySeats(char[][COLS]); void reserveSeat(char [ROWS][COLS]); int main() { int number=0; //holder variable char seatChar[ROWS][COLS]; for (int i = 0; i < ROWS; i++) { for (int j = 0; j < COLS; j++) { seatChar[i][j] = '-'; } } int choice; //input from menu bool repeat = true; //needed for switch loop while (repeat...
Please provide answer in the format that I provided, thank you Write a program that prompts...
Please provide answer in the format that I provided, thank you Write a program that prompts the user to input a string. The program then uses the function substr to remove all the vowels from the string. For example, if str=”There”, then after removing all the vowels, str=”Thr”. After removing all the vowels, output the string. Your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel. You must...
//evil_server.cpp #include <string> #include <cstdlib> #include <iostream> #include "evil_server.h" using namespace std; EvilServer :: EvilServer() {...
//evil_server.cpp #include <string> #include <cstdlib> #include <iostream> #include "evil_server.h" using namespace std; EvilServer :: EvilServer() {    hacked[0] = hacked[1] = hacked[2] = false;    passwords[agent_index(MrMean)] = random_pw(MrMean);    passwords[agent_index(MsChief)] = random_pw(MsChief);    passwords[agent_index(DrEvil)] = random_pw(DrEvil); } void EvilServer :: change_pw(EvilAgent agent, string new_pw) {    int index = agent_index(agent);    if (new_pw == passwords[index])        return;    hacked[index] = false;    passwords[index] = new_pw; } string EvilServer :: random_pw(EvilAgent agent) {    string password;    int length;   ...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT