c++ console application
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: c++ console application

  1. #1
    Join Date
    Nov 2010
    Posts
    2

    c++ console application

    I am a newbie on c++

    I am creating a console application that has some value in string and using Console::Writeline it will display this value, following is the sample code i am using.

    std::string response;
    Console::WriteLine(response);

    Plz help

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,248

    Re: c++ console application

    What help are you looking for?

  3. #3
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,583

    Re: c++ console application

    std::string and Console::WriteLine() don't easily mix. This one compiles with just a compiler warning (C4800):

    Code:
      Console::WriteLine(response.c_str());
    But it certainly won't do what you expect. (If you're curious, just try it... )

    It generally is no good idea to mix the C++ standard library with the CLR infastructure without a real need to do so.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center