string data type

hi actually i wanted to use string datatype provided by c++! i tried declaring a variable of type string like this
#include
#include
int main()
{
string str("ALPHA");
cout<<str;
return 0;
}
but this results in an error plz help me!!!

Comments


  • You are mixing C with C++:
    [code]#include
    #include

    int main()
    {
    std::string str("ALPHA");
    std::cout << str;
    return 0;
    }[/code]

    Also, this would have been better posted in the beginner C++ board as a) It has nothing to do with the Win32 API and b) is a basic question.
    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • : Also, this would have been better posted in the beginner C++ board
    : as a) It has nothing to do with the Win32 API and b) is a basic
    : question.


    Moved. :-)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories