俺的第一个C++程序----冒泡泡
// CLRPractice.cpp : main project file.#include "stdafx.h"#include <stdlib.h>#include <iostream>using namespace System;using namespace std;int main(array<System::String ^> ^args){int target[]={11,5,4,3,6,9,10,33,12,34,8,90,1,2};int length = sizeof(target)/sizeof(int);int* ints = target;for(int k = 0; k < length; k ++) { int temp = *(ints + k);for(int i = k + 1; i < length; i ++) {if(*(ints + i ) > temp ){ int temp2 = *(ints + i);*(ints + k) = temp2;*(ints + i) = temp;temp = temp2;}}}for(int i = 0; i < length; i ++) { cout<<*(ints + i)<<endl;}Console::ReadLine();}