1
#include <istream>  //Includes the input/output library

using namespace std; // Makes std features available
// The main function of the program 
// It outputs the greeting to the screen
int main()  {
    count <<"Hello World! I am C++ Program." <<endl;
    return 0;
}
IntelliSense: no operator message Line 7, Column 8 
error C2563:mismatch in formal parameter list Line 7, Column 1
melpomene
  • 84,125
  • 8
  • 85
  • 148
Vick7
  • 21
  • 4

2 Answers2

4

Replace #include <istream> with the correct header, #include <iostream>.

  • Helpful mnemonic:
    • io = input/output
    • stream = "stream of data"

Additionally, the name of the standard output stream is std::cout or cout with the std:: namespace scope removed.

  • Helpful mnemonic:
    • std:: = Standard library's
    • cout = console output
CinchBlue
  • 6,046
  • 1
  • 27
  • 58
1

The problems you are having with your simple block of code is simply: spelling errors.

Firstly, you have misspelled the input/output stream file in your include statement, so you need to rename the header file to:

    #include <iostream>

There is no heade file named istream.

Secondly, you also misspelled the cout function to count. Change that line to:

    cout << "Hello World! I am C++ Program." << endl;

Those lines should work now.


Also a recommendation for your future programs; avoid using the line

   using namespace std;

Why? Because as you move on to more complex programming, you will undoubtedly learn and begin to define a data type or variable, and sometimes, that name may also be used by the standard library. As a result, you will have a hard time trying to differentiate the variables or data types you defined and the ones defined in the std library.

Therefore, try and attach std:: before every function that is a part of the standard library.


EDIT: The code you posted in the comments box is pretty unreadable, so I just fixed it and have posted it below:

#include <iostream>  //Includes the input/output library

using namespace std; // Makes std features available

// The main function of the program 
// It outputs the greeting to the screen
int main()  
{
    cout <<"Hello World! I am C++ Program." <<endl;
    return 0;
}

I've tried this in my IDE and fixed with the same and only recommendations from above. It works for me.

BusyProgrammer
  • 2,783
  • 5
  • 18
  • 31
  • #include //Includes the input/output library std:: // Makes std features available // The main function of the program // It outputs the greeting to the screen int: main(); { cout << "Hello World! I am C++ Program." << endl; return 0; } Now I am receiving a total of 6 errors that list these things: – Vick7 Feb 05 '17 at 00:48
  • Error 4 error C2447: '{' : missing function header (old-style formal list?) – Vick7 Feb 05 '17 at 00:50
  • Error 1 error C2589: 'int' : illegal token on right side of '::' – Vick7 Feb 05 '17 at 00:50
  • Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int – Vick7 Feb 05 '17 at 00:51
  • 6 IntelliSense: expected a declaration – Vick7 Feb 05 '17 at 00:51
  • 5 IntelliSense: expected an identifier – Vick7 Feb 05 '17 at 00:51