Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
6.5 - variable kinds suitable for use as loop counter
#1
Which of the following is a 'variable' and thus suitable for use as loop counter (and subject to the restrictions on loop-control-variables)?
  • local variable
  • static/global variable
  • class member variable
  • function parameter [code]void f(int x) { for (; x
<t></t>
Reply
#2
All your examples are acceptable as loop counters
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)