What is "##" preprocessor directive used for or how does it work? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

What is "##" preprocessor directive used for or how does it work?

4th Jun 2017, 10:23 AM
Krutika Potabatti
Krutika Potabatti - avatar
3 Respostas
+ 4
thnku ma'amšŸ˜…@vaishnavi
6th Jun 2017, 10:37 AM
Krutika Potabatti
Krutika Potabatti - avatar
+ 3
ā€˜##ā€™ preprocessing operator performs token pasting. When a macro is expanded, the two tokens on either side of each ā€˜##ā€™ operator are combined into a single token, which then replaces the ā€˜##ā€™ and the two original tokens in the macro expansion. Usually both will be identifiers, or one will be an identifier and the other a preprocessing number. When pasted, they make a longer identifier. This isnā€™t the only valid case. It is also possible to concatenate two numbers (or a number and a name, such asĀ 1.5Ā andĀ e3) into a number. Also, multi-character operators such asĀ +=Ā can be formed by token pasting.
6th Jun 2017, 7:07 AM
Vaishnavi Aurangabadkar
Vaishnavi Aurangabadkar - avatar
+ 2
thanx for your regards sir!
5th Jun 2017, 5:01 PM
Krutika Potabatti
Krutika Potabatti - avatar