Problems when trying to store things as a string that has quotes.

Thread Solved

Join Date: Apr 2007
Posts: 9
Reputation: generalGOTCHA is an unknown quantity at this point 
Solved Threads: 0
generalGOTCHA generalGOTCHA is offline Offline
Newbie Poster

Problems when trying to store things as a string that has quotes.

 
0
  #1
Apr 30th, 2007
say I need to the below to store as a string variable.

Set autoUpdateClient = CreateObject("Microsoft.Update.AutoUpdate",strComputer)

notice teh quotations ? How can I store all of this as one string with the quotations included ?

I need to store this so I can manipulate it, but those quotes keep throwing me problems.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 8,313
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 825
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Problems when trying to store things as a string that has quotes.

 
0
  #2
Apr 30th, 2007
Where are you storing it? How you proceed depends on the quotation rules of whatever storage medium you're using. For example, if you were pasting that into a C++ string literal, you would need to escape the quotations for it to work:
  1. "Set autoUpdateClient = CreateObject(\"Microsoft.Update.AutoUpdate\",strComputer)"
In case you were wondering, yes, I do hate you.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,441
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 32
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: Problems when trying to store things as a string that has quotes.

 
0
  #3
May 1st, 2007
whenever you wish to print or store code that is recognized as system code (meaning it will not be printed) such as quotes in a printf or cout, or things like that, you must include a "\" before the code... i.e.:

  1. \"
  2. \\
  3. \%
  4.  
etc...
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 9
Reputation: generalGOTCHA is an unknown quantity at this point 
Solved Threads: 0
generalGOTCHA generalGOTCHA is offline Offline
Newbie Poster

Re: Problems when trying to store things as a string that has quotes.

 
0
  #4
May 2nd, 2007
Thanks very much.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 1116 | Replies: 3
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC