Why does the compiler complain if I attempt to use a vector as a base container for a stack of double values? The declaration is:
```
stack
```
The VC++ compiler says
```
stack
//before identifier 'myStack'
```
The Borland compiler identifies the line where the error occurs but provides these (unhelpful)error messages:
```
10: Undefined symbol 'myStack' in function main()
10: Cannot generate template specialization from '
vector
12: Improper use of typedef 'stack
in function main()
12.: Statement missing ; in function main()
```
Each compiler is using the “maximum munch” algorithm for collecting input characters to make tokens. This means the compiler collects the most symbols possible that make a legal token in the C++ language. The closing > for int and the closing > for int, vector
You might also like to view...
Answer the following statements true (T) or false (F)
1. To add a control, the user must write the code that instantiates the control object from a class. 2. The form acts as a container for components and controls. 4. The correct syntax for an event handler is eventName_controlName. 5. By looking up a control’s class and clicking the events section, you can determine all the events and the arguments that a control has
Which of the following represents a broadcast IP address?
A. 0.0.0.0 B. FF:FF:FF:FF:FF:FF C. 255.255.255.255 D. 1.1.1.1
Locating and repairing all syntax errors is part of the process of ____ a program.
A. interpreting B. compiling C. debugging D. executing
To return a value, a function must use a(n) ____ statement.
A. exit B. throw C. break D. return