Thread: oprantds errors of type int and const char [31] to binary???

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    1

    Question oprantds errors of type int and const char [31] to binary???

    Hey everyone, I'm alittle new to programming and i just downloaded the bloodshed C++ compiler and keep getting messages that reads " invalid operands of types `int' and `const char[13]' to binary `operator<<'" and i have no idea what that means or how to fix it. If anyone out there can help me i would really appretiate it.

    This is the program incase u need it

    #include <windows.h>
    #include <stdio.h>
    #include <stdlib.h>

    int main (int argc, char *argv[])
    {
    'cout' << "Hello World!" << 'endl';

    'cout' << "Press ENTER to continue..." << 'endl';
    getchar ();
    return 0;
    }

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    Don't put single quotes around your identifiers. Then use the correct headers.
    Code:
    #include <cstdlib>
    #include <iostream>
    using namespace std;
    
    int main (int argc, char *argv[])
    {
       cout << "Hello World!" << endl;
    
       system("pause");
       return 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Drawing Program
    By Max_Payne in forum C++ Programming
    Replies: 21
    Last Post: 12-21-2007, 05:34 PM
  4. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  5. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 11:58 AM