PDA

View Full Version : Braces in C++


lucca
11-04-2002, 08:52 AM
How do I type braces (parentesi graffe, that's in Italian! )in a Visual C++ program since they are not available on the keyboard: only ( ) and [ ] are available ? Thanks LB

tommy
11-05-2002, 03:10 AM
It probably depends on the keyboard you have, but on mine the { and } are CAPS for the [ and ] keys.

Paul Komski
11-05-2002, 11:15 PM
Have a look at the CharacterMap under Accessories<>SystemTools and see if the braces are shown as extended characters. If so then you can copy and paste them. Alternative read the key code in the bottom right corner and if this is something like ALT+0182, you can print this character in a Windows Application by holding down the ALT key, then press the sequence of all four numbers (FROM THE NUMBER PAD AND NOT FROM THE NUMBERS AT THE TOP OF THE KEYBOARD) and when you release the ALT key the character should appear.

As long as the application you are using has a replace function (like WordPad) you could write your program using another key or bracket and when you had finished replace them all with the curly braces in one go (well two goes; one for each brace). ;)

On my keyboard { = ALT+0123 and } = ALT+0125 but maybe that is different in Italiano.

lucca
11-06-2002, 03:47 PM
The right answer,which I have successfully used, was the first: Ctrl +Alt+Maiusc+square parenthesis. Thanks to all for the help!LB.