Double Quotes in C++?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • perseus

    #1

    Double Quotes in C++?

    I need to find in a file the string:

    cellpadding="10 "

    Since I cannot use double quotes for it, how to I do it?
    Thanks a million!

    perseus

  • Spikinsson

    #2
    Re: Double Quotes in C++?

    "perseus" <fanta@fantigo. com> schreef in bericht
    news:a957hvk0lg qaec9eth3su4aci tikh5ed0k@4ax.c om...[color=blue]
    > I need to find in a file the string:
    >
    > cellpadding="10 "
    >
    > Since I cannot use double quotes for it, how to I do it?
    > Thanks a million!
    >
    > perseus[/color]

    You need to escape it with the backslash:
    cellpadding=\"1 0\" (char a[] = "cellpadding=\" 10\"";)

    Now if you want to use a backslash, you have to escape it too: \\ eg. char a[] =
    "c:\\windows\\s ystem\\";


    Comment

    Working...