StringCollection.cpp
上传用户:sz0451
上传日期:2022-07-29
资源大小:256k
文件大小:1k
- // This is the main project file for VC++ application project
- // generated using an Application Wizard.
- #include "stdafx.h"
- #using <mscorlib.dll>
- #using <System.dll>
- using namespace System;
- using namespace System::Collections::Specialized;
- // This is the entry point for this application
- #ifdef _UNICODE
- int wmain(void)
- #else
- int main(void)
- #endif
- {
- StringCollection* psc = new StringCollection();
- psc->Add(new String("Rhyl"));
- psc->Add(new String("Prestatyn"));
- psc->Add(new String("Abersoch"));
- psc->Add(new String("Nefyn"));
- int arr1 __gc[] = new int __gc[10];
- for (int i=0; i<arr1->Count; i++)
- {
- arr1[i] = i * i;
- Console::WriteLine(arr1[i]);
- }
- return 0;
- }