Thread: strange result of after compiling a program

  1. #1
    Unregistered
    Guest

    Exclamation strange result of after compiling a program

    Dear friends,

    I was compiling a program and it continues giving me
    this type of error.... what is going on ?

    ! dist.cpp: In function `int main(int, char **)':
    ! dist.cpp:45: call of overloaded `get(int &)' is ambiguous
    ! C:\Program Files\GNUCPP\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..
    * \include\g++-3\iostream.h:127: candidates are: class istream & istream::get(
    * har &) <near match>
    .
    .
    .
    .

    C:\Program Files\GNUCPP\bin\..\lib\gcc-lib\i386-mingw32\2.95.2\..\..\..\..
    * \include\g++-3\iostream.h:144: class istream & istream::get(
    * treambuf &, char = '\n') <near match>
    ! make: *** [dist.o] Error 1


    can anyone tell me what is going wrong I even put so many header files just to figure out what is going on......I am lost so please help!!!!!!!!!!!!!

  2. #2
    Unregistered
    Guest
    that function would be used like this:

    int main( )
    {
    char ch;
    cout << "enter a character" << endl;
    cin.get( ch );
    return 0;
    }

    Is this what it looks like in your program?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with basic calculation program.
    By StateofMind in forum C Programming
    Replies: 18
    Last Post: 03-06-2009, 01:44 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Replies: 5
    Last Post: 04-10-2006, 03:03 PM
  4. Replies: 7
    Last Post: 12-14-2003, 01:00 PM
  5. bcc32 compiling error (really strange!!)
    By jester in forum C++ Programming
    Replies: 14
    Last Post: 01-26-2002, 04:00 PM