Results 1 to 2 of 2
  1. #1
    howl2000's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    USA
    Posts
    99
    Reputation
    10
    Thanks
    3,118
    My Mood
    Busy

    Post Help with code. Using quotes within quotes.

    I need to use quotes within quotes for a command line argument for it to execute properly. I have tried exiting quotes with another set of quotes. """ I have also tried to exit quotes with \"". This just asks for expected end of line ; and won't compile. I also tried using literals @" and had no luck getting it to work as well.


    Code:
                        process22.StartInfo.Arguments = "/C advfirewall firewall set rule name="blocknet" new enable="no"";
    Can anyone word this where it will compile? I searched for answer, but none that I found have worked in this circumstance. I considered combining strings, but I am still learning to code so I want to know the normal solution. It's the last piece of code in my program that I need working before my program is ready to go.


    Code:
       process22.StartInfo.Arguments = @"/C advfirewall firewall set rule name=""blocknet"" new enable=""yes""";
    This code compiles but does not accept arguments.
    Last edited by howl2000; 08-31-2014 at 07:14 PM.

  2. #2
    InunoTaishou's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    The Internet
    Posts
    446
    Reputation
    20
    Thanks
    950
    My Mood
    Relaxed
    \"

    These are called escape sequences. Characters that have no visible images or have special meaning in C++

    Here's a few more
    Code:
    newline				\n		horizontal tab		\t		alert (bell)		\a
    verticle tab		\v		backspace			\b		double quote		\"
    backslash			\\		question mark		\?		single quote		\'
    carriage return		\r		formfeed			\f

Similar Threads

  1. [Help Request] Need Help with coding a RealmRelay Script!
    By Alde. in forum Realm of the Mad God Help & Requests
    Replies: 6
    Last Post: 12-15-2013, 05:08 PM
  2. [Help Request] Help With Coding
    By GreenPro in forum Visual Basic Programming
    Replies: 8
    Last Post: 05-09-2013, 09:58 AM
  3. [Help Request] Help with code
    By Alpha Toon in forum Call of Duty Black Ops 2 Help
    Replies: 0
    Last Post: 01-08-2013, 07:50 PM
  4. [Help Request] Need help with Coding.
    By Squeeze in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 10-09-2012, 09:32 PM
  5. [Help Request] Easy Help with coding hacks? like the easiest hacks?
    By 0pticisback in forum Combat Arms EU Help
    Replies: 5
    Last Post: 12-22-2011, 05:19 AM