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"
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top