1. The scope of variables is more or less standard Java/C-like -- variables can be used anywhere in the scope in which they are declared or scopes enclosed within, and the underlying values can be passed around to other scopes. File-scope variables can be accessed in pretty much any shred created in that file. Sharing variables across files tends to be more complicated -- the basic paradigm is to make a public class and access static variables or methods within that.
3. Depending on what your C++ code is doing, you could use a chugin (ChucK plugin). These are generally most appropriate for unit generators and relatively simple generic library functionality. One simple example, Bitcrusher:
4. The installer should also have installed the command line executable -- you can check this by opening up a window in Terminal and entering a chuck command:
$ chuck --version
chuck version: 1.3.2.0 (chimera)
mac os x : intel : 64-bit
$ chuck --help
...
etc.
spencer