ex5_8.c

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 25 行

C
25
字号
//
// Copyright (C) 1991 Texas Instruments Incorporated.
//
// Permission is granted to any individual or institution to use, copy, modify,
// and distribute this software, provided that this complete copyright and
// permission notice is maintained, intact, in all copies and supporting
// documentation.
//
// Texas Instruments Incorporated provides this software "as is" without
// express or implied warranty.
//

#include <cool/Vector.h>                        // Include vector class

#include <cool/Vector.C>

int main (void) {
    cout << __FILE__ << endl;
  CoolVector<int> v1;                           // Declare CoolVector object
  for (int i = 0; i < 10; i++)                  // Copy 10 integers into CoolVector
    v1.push(i);                                 // Add element
  cout << v1 << "\n";                           // Output CoolVector elements
  return (0);                                   // Exit with successful status
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?