What do the symbols and operations mean in resolving C++ text problems?

  • Context: C/C++ 
  • Thread starter Thread starter ere
  • Start date Start date
  • Tags Tags
    Operations Text
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
ere
Messages
9
Reaction score
0
i am faced with some homework in Resolve/C++ and encountered several problems

Code:
	ensures
	    t1 = #t1 * #t2

-what do the pound signs before the variables mean?
-what does it mean when one text "*" another text?

hope someone can help. can't really find much resolve/C++ help online. thanks!
 
Physics news on Phys.org
# is reserved for the preprossor.
Either there is a definition somewhere that says #define t1 = "blah" or somehow the code has got screwed up in the email / web page.

Multiplying text can mean whatever you overload the operator to mean. Text * a number might reasonably mean repeat the text 'number' times but multiplying text * text is probably a silly thing to do.
 
#t1 is the previous value of t1.
If t1 is originally "cat", then t1 = #t1 + #t1 means t1 will be "catcat"