Menu

noolalpha

2002-11-16
2012-09-26
  • Nobody/Anonymous

    The following test program works on Borland 5.5, but on Dev 4.01 with MinGW 2.95 gives a:

      `boolalpha' undeclared (first use this function)

    error.

    #include <algorithm>
    #include <fstream.h>
    #include <iostream>
    #include <list>
    #include <stdlib.h>
    #include <vector>
    #include <string>
    #include <cmath>
    #include <map>
    #include <ctime>
    #include <utility>
    #include <set>
    #include <iomanip>

    using namespace std;

    int main()
    {
        vector<string> v;
       
        v.push_back("arc");
        v.push_back("Arc");
        v.push_back("ARC");
        v.push_back("aRc");
       
        cout << endl << boolalpha << (v[0] == v[1]) << endl;
       
        cout << endl << endl;     
        system("PAUSE");
    return 0;
    }

    Does anyone have any idea why this is?

    Thanks

    Derek

    In case you're wondering the unnecessary includes are hangovers from earlier testing.

     
    • Nobody/Anonymous

      Compiles fine with G++ 3.2

      Think this is one of the bugs with 2.95 and manipulators.

      Get the latest version from MinGW sextion of SourceForge.net

      BlakJak :]

       
    • Nobody/Anonymous

      Thanks for the reply

      Derek

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.