Like Tree3Likes
  • 3 Post By laserlight

This is a string casting?

This is a discussion on This is a string casting? within the C++ Programming forums, part of the General Programming Boards category; Hi, I see it everywhere but I can't find what´s mean the S before a constant string..... is a string ...

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    4

    This is a string casting?

    Hi, I see it everywhere but I can't find what´s mean the S before a constant string..... is a string casting? or what?

    Code:
    StreamWriter* pwriter = new StreamWriter(S"c:\\KBTest.txt");
    pwriter->WriteLine(S"File created using StreamWriter class.");

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,801
    On a hunch, I searched for "managed C++ string literal", and found: String Literal. So, if you are seeing it "everywhere", it means that you are using Microsoft's Managed extensions for C++.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    4
    Thanks, that is exactly what I need....... you are really a C++ witch

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Casting *string to *char legal?
    By Programmer_P in forum C++ Programming
    Replies: 5
    Last Post: 06-01-2010, 12:53 AM
  2. casting a string of chars as a string of ints
    By otz111 in forum C Programming
    Replies: 5
    Last Post: 09-25-2009, 05:53 PM
  3. Casting const char * to STL string
    By valaris in forum C++ Programming
    Replies: 8
    Last Post: 12-27-2008, 10:03 AM
  4. Casting a vector to a string
    By Hikaru in forum C++ Programming
    Replies: 10
    Last Post: 08-21-2006, 07:55 PM
  5. Casting boolean as string
    By doofusboy in forum C Programming
    Replies: 11
    Last Post: 11-10-2005, 11:24 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21