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

  • Thread starter Thread starter ere
  • Start date Start date
  • Tags Tags
    Operations Text
AI Thread Summary
In the discussion, the use of pound signs before variables in Resolve/C++ indicates that they are referencing previous values of those variables, likely due to a preprocessor directive. The expression t1 = #t1 * #t2 raises questions about the meaning of multiplying text. In this context, multiplying text by a number typically implies repeating the text that number of times, while multiplying text by text is generally not a standard operation and may depend on operator overloading. For example, if t1 is "cat," then the operation t1 = #t1 + #t1 would result in t1 being "catcat." The conversation highlights the challenges of finding specific help for Resolve/C++ programming issues.
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!
 
Technology 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"
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top