Garbage Collection

塵も積もれば山

目次

Blog 利用状況

ニュース

C++とかC#とか数学ネタを投下していく予定です。

[その他のページ]
日々の四方山話を綴った日記出水の日記帳

書庫

日記カテゴリ

[C++/CLI]相互LINQ

相手がC#からSTL/CLRにアクセスするならば
こっちはC++/CLIからLINQにアクセスですよ!

まず、デフォルトではLINQクラスは見えないので、
System.Coreを参照に追加する必要があります。

これで準備完了です。
早速、テストの平均点を求めるプログラムを作ってみます。
ただし、以下の条件を追加します。

・テストの点は0点以上100点以下、それ以外のデータは除外。
・トップとビリの2人の得点は除外。

#include "stdafx.h"
using namespace System;
using namespace System::Linq;
using namespace System::Collections::Generic;
int pipe(int i){return i;}
bool valuecheck(int i){return 0 <= i && i <= 100;}
int main(array<System::String ^> ^args)
{
  List<int> ^data = gcnew List<int>();
  /* LINQをワシワシと組み立てる! */
  IEnumerable<int> ^en;
  en = Enumerable::Where<int>(data, gcnew Func<int, bool>(valuecheck));
  en = Enumerable::OrderByDescending<int, int>(en, gcnew Func<int, int>(pipe));
  en = Enumerable::Skip(en, 1);
  en = Enumerable::Reverse(en);
  en = Enumerable::Skip(en, 1);
  /* で、今更データを突っ込む */  
  array<int> ^d = gcnew array<int>{100, 60, 61, 57, 87, -1, 56, 67};
  data->AddRange(d);
  /* 残ったデータは何かな? */
  for each(int v in en){
    Console::Write(v + " ");
  }
  Console::Write("\n");
  /* 平均はどうだ? */
  Console::WriteLine("Average = " + Enumerable::Average(en));
    return 0;
}

さて、どうだ!?

どうやら成功したっぽいです。

#ぶっちゃけ、ビミョー

投稿日時 : 2008年6月26日 21:40

Feedback

# re: [C++/CLI]相互LINQ 2008/06/26 22:22 アキラ

C++ なら Range-base ライブラリを使おう、と宣伝してみる
http://d.hatena.ne.jp/faith_and_brave/20080613/1213347495

C++/CLI のことは全く考えてないですけどね

# re: [C++/CLI]相互LINQ 2008/06/27 1:17 NyaRuRu

http://d.hatena.ne.jp/NyaRuRu/20051017/p1
もっとも,これを書いたときに C++ の Range-based なライブラリや Expression Template を知っていれば,そちらを例に挙げていたと思います.

シンタックスの問題と見るなら,結局こういうところが焦点になるんじゃないでしょうかね.
http://d.hatena.ne.jp/NyaRuRu/20080316/p2

# re: [C++/CLI]相互LINQ 2008/06/27 7:59 出水

どこに落としどころをもっていくか決まらなくてですね…
なんか、もやもやっとしたものが…

遅延評価ライブラリとしてみたら機能的にいまいちで
文法的な所はVBのLINQで書いたほうがすっきりで
もやもやの原因はこの辺なのかなぁと

まぁ、LINQ自体私もよく知らないのも原因なのですが

# WpPUeJyuWEgsSJQ 2014/08/04 3:49 http://crorkz.com/

rFp9K5 I truly appreciate this post. Want more.

# HgLZziTMTOPqBs 2014/08/05 5:15 http://crorkz.com/

hZJ9DZ Im grateful for the blog article.

# aLODwidEDNVlWLB 2014/09/05 23:56 https://www.youtube.com/watch?v=bmyZcX8nn50

I do not even know how I ended up here, but I assumed this post was good. I don't realize who you might be however certainly you're going to a famous blogger for those who are not already ;) Cheers!

# zUAjRmRNzdcLWO 2014/09/09 22:01 http://www.designingdigitally.com

you've gotten a terrific weblog here! would you prefer to make some invite posts on my blog?

# iodJINHfkcxgxLTNXo 2014/09/10 19:38 http://www.nobisca.com

I will right away grasp your rss feed as I can't to find your e-mail subscription link or e-newsletter service. Do you've any? Kindly let me realize in order that I may just subscribe. Thanks.

# leSYjCwIPNwG 2014/09/16 18:43 https://www.youtube.com/watch?v=6BlpsZ7LHRQ

It's laborious to search out educated people on this subject, but you sound like you understand what you're talking about! Thanks

# pbADBatPeXRFpVxS 2014/09/17 17:08 http://www.1818-888.com

I love what you guys tend to be up too. This kind of clever work and exposure! Keep up the amazing works guys I've incorporated you guys to my blogroll.

# KUEypETmLQSIEOlYD 2014/09/18 0:06 http://youtu.be/g68g0W6gbIc

Thanks for the good writeup. It actually was a enjoyment account it. Glance complex to far added agreeable from you! By the way, how could we keep in touch?

# EzWkKJlkrjkSuA 2014/09/18 17:14 http://guccijps.info/story.php?id=29145

mIZtJw Very informative post. Keep writing.

# グッチ財布コピーコピー 2017/08/26 22:53 termbit@goo.ne.jp

ヴィトンコピー品激安販売店2017新品大SALE
ルイ・ヴィトンコピー品激安販売店の新品大SALEが開催します。
ルイヴィトン人気コピー品、コピールイヴィトン新作、ルイヴィトンダミエコピー、ルイヴィトンモノグラムコピー、コピーブランド腕時計…
いろいろ新品が続々登場します。バッグ、靴、帽子、スカーフ...
お綺麗を展示ため、ぜひおすすめの逸品です。
時間の制限がない、いつでもご愛用頂きます。
グッチ財布コピーコピー http://www.nawane111.com/panerai.htm

# ブランド腕時計 2018/09/06 7:18 pawkdhlq@docomo.ne.jp

2018年の新素材-新作
ブランド腕時計、バッグ、財布、小物などでございます専売店
★弊社は「信用第一」をモットーにお客様にご満足頂けるよう
★全物品運賃無料(日本全国)
★不良品物情況、無償で交換します.
★税関没収する商品は再度無料で発送します!

# My brother suggested I might like this blog. He was entirely right. This post actually made my day. You cann't imagine just how much time I had spent for this info! Thanks! 2018/10/05 8:43 My brother suggested I might like this blog. He wa

My brother suggested I might like this blog. He was entirely
right. This post actually made my day. You cann't
imagine just how much time I had spent for this info!
Thanks!

# I do consider all of the ideas you have presented for your post. They are very convincing and will definitely work. Nonetheless, the posts are very short for beginners. May you please extend them a bit from subsequent time? Thanks for the post. 2018/11/02 19:21 I do consider all of the ideas you have presented

I do consider all of the ideas you have presented for your post.
They are very convincing and will definitely work.
Nonetheless, the posts are very short for beginners.
May you please extend them a bit from subsequent
time? Thanks for the post.

# Wonderful beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog website? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea 2018/11/03 19:56 Wonderful beat ! I wish to apprentice while you am

Wonderful beat ! I wish to apprentice while you amend
your website, how can i subscribe for a blog website?
The account aided me a acceptable deal. I had
been a little bit acquainted of this your broadcast provided
bright clear idea

# I really like what you guys are usually up too. This kind of clever work and exposure! Keep up the wonderful works guys I've added you guys to my blogroll. 2018/11/21 19:33 I really like what you guys are usually up too. Th

I really like what you guys are usually up too.
This kind of clever work and exposure! Keep up the wonderful works
guys I've added you guys to my blogroll.

# Just wish to say your article is as astounding. The clearness for your post is simply cool and that i can assume you're knowledgeable in this subject. Well along with your permission allow me to clutch your feed to stay up to date with forthcoming post 2019/06/07 12:19 Just wish to say your article is as astounding. Th

Just wish to say your article is as astounding. The clearness for your post
is simply cool and that i can assume you're knowledgeable in this subject.
Well along with your permission allow me to clutch your feed to stay up to date with forthcoming post.
Thanks a million and please continue the rewarding work.

# I'm really enjoying the theme/design of your weblog. Do you ever run into any internet browser compatibility problems? A handful of my blog visitors have complained about my website not operating correctly in Explorer but looks great in Opera. Do you hav 2019/06/07 23:46 I'm really enjoying the theme/design of your weblo

I'm really enjoying the theme/design of your weblog.
Do you ever run into any internet browser compatibility problems?
A handful of my blog visitors have complained about my website not
operating correctly in Explorer but looks great in Opera.
Do you have any recommendations to help fix this issue?

# What's up friends, how is the whole thing, and what you would like to say about this paragraph, in my view its truly awesome in support of me. 2019/06/13 3:16 What's up friends, how is the whole thing, and wha

What's up friends, how is the whole thing, and what you would like to say about this
paragraph, in my view its truly awesome in support of me.

# Hi! Someone in my Myspace group shared this site with us so I came to give it a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Great blog and great style and design. 2019/07/20 21:39 Hi! Someone in my Myspace group shared this site w

Hi! Someone in my Myspace group shared this site with us so I
came to give it a look. I'm definitely loving the information. I'm
bookmarking and will be tweeting this to my followers!
Great blog and great style and design.

# Magnificent goods from you, man. I've take into account your stuff prior to and you're simply too magnificent. I actually like what you've got here, really like what you're stating and the way wherein you are saying it. You're making it enjoyable and y 2021/08/24 9:32 Magnificent goods from you, man. I've take into ac

Magnificent goods from you, man. I've take into account your stuff prior to and you're
simply too magnificent. I actually like what you've
got here, really like what you're stating and the way wherein you are
saying it. You're making it enjoyable and you continue to care for to stay it smart.
I cant wait to learn far more from you. This is really a terrific web site.

# Magnificent goods from you, man. I've take into account your stuff prior to and you're simply too magnificent. I actually like what you've got here, really like what you're stating and the way wherein you are saying it. You're making it enjoyable and y 2021/08/24 9:33 Magnificent goods from you, man. I've take into ac

Magnificent goods from you, man. I've take into account your stuff prior to and you're
simply too magnificent. I actually like what you've
got here, really like what you're stating and the way wherein you are
saying it. You're making it enjoyable and you continue to care for to stay it smart.
I cant wait to learn far more from you. This is really a terrific web site.

# Magnificent goods from you, man. I've take into account your stuff prior to and you're simply too magnificent. I actually like what you've got here, really like what you're stating and the way wherein you are saying it. You're making it enjoyable and y 2021/08/24 9:34 Magnificent goods from you, man. I've take into ac

Magnificent goods from you, man. I've take into account your stuff prior to and you're
simply too magnificent. I actually like what you've
got here, really like what you're stating and the way wherein you are
saying it. You're making it enjoyable and you continue to care for to stay it smart.
I cant wait to learn far more from you. This is really a terrific web site.

# Magnificent goods from you, man. I've take into account your stuff prior to and you're simply too magnificent. I actually like what you've got here, really like what you're stating and the way wherein you are saying it. You're making it enjoyable and y 2021/08/24 9:35 Magnificent goods from you, man. I've take into ac

Magnificent goods from you, man. I've take into account your stuff prior to and you're
simply too magnificent. I actually like what you've
got here, really like what you're stating and the way wherein you are
saying it. You're making it enjoyable and you continue to care for to stay it smart.
I cant wait to learn far more from you. This is really a terrific web site.

# Hi, i think that i saw you visited my web site so i came to “return the favor”.I am trying to find things to enhance my website!I suppose its ok to use a few of your ideas!! 2021/08/28 13:15 Hi, i think that i saw you visited my web site so

Hi, i think that i saw you visited my web site so i came to
“return the favor”.I am trying to find things to enhance
my website!I suppose its ok to use a few of
your ideas!!

# You need to be a part of a contest for one of the finest sites on the internet. I will recommend this web site! 2021/08/30 18:23 You need to be a part of a contest for one of the

You need to be a part of a contest for one of the finest sites on the internet.
I will recommend this web site!

# You need to be a part of a contest for one of the finest sites on the internet. I will recommend this web site! 2021/08/30 18:24 You need to be a part of a contest for one of the

You need to be a part of a contest for one of the finest sites on the internet.
I will recommend this web site!

# Hello colleagues, how is the whole thing, and what you desire to say concerning this paragraph, in my view its in fact remarkable for me. 2021/09/02 0:21 Hello colleagues, how is the whole thing, and what

Hello colleagues, how is the whole thing, and what you desire to
say concerning this paragraph, in my view its
in fact remarkable for me.

# Hello colleagues, how is the whole thing, and what you desire to say concerning this paragraph, in my view its in fact remarkable for me. 2021/09/02 0:22 Hello colleagues, how is the whole thing, and what

Hello colleagues, how is the whole thing, and what you desire to
say concerning this paragraph, in my view its
in fact remarkable for me.

# Hello colleagues, how is the whole thing, and what you desire to say concerning this paragraph, in my view its in fact remarkable for me. 2021/09/02 0:23 Hello colleagues, how is the whole thing, and what

Hello colleagues, how is the whole thing, and what you desire to
say concerning this paragraph, in my view its
in fact remarkable for me.

# Hello colleagues, how is the whole thing, and what you desire to say concerning this paragraph, in my view its in fact remarkable for me. 2021/09/02 0:24 Hello colleagues, how is the whole thing, and what

Hello colleagues, how is the whole thing, and what you desire to
say concerning this paragraph, in my view its
in fact remarkable for me.

# Oh my goodness! Awesome article dude! Many thanks, However I am encountering problems with your RSS. I don't understand the reason why I am unable to join it. Is there anybody having identical RSS problems? Anyone that knows the solution can you kindly re 2021/09/02 15:39 Oh my goodness! Awesome article dude! Many thanks,

Oh my goodness! Awesome article dude! Many thanks, However I am encountering
problems with your RSS. I don't understand the reason why I am unable to join it.
Is there anybody having identical RSS problems?
Anyone that knows the solution can you kindly respond?
Thanx!!

# I'm not sure why but this website is loading very slow for me. Is anyone else having this problem or is it a problem on my end? I'll check back later on and see if the problem still exists. 2021/09/03 15:25 I'm not sure why but this website is loading very

I'm not sure why but this website is loading very slow for me.
Is anyone else having this problem or is it a problem on my end?

I'll check back later on and see if the problem still exists.

# Hey! Someone in my Myspace group shared this site with us so I came to take a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Excellent blog and wonderful design. scoliosis surgery https://coub.com 2021/09/14 9:11 Hey! Someone in my Myspace group shared this site

Hey! Someone in my Myspace group shared this site with
us so I came to take a look. I'm definitely loving
the information. I'm bookmarking and will be tweeting this to my followers!
Excellent blog and wonderful design. scoliosis surgery
https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# Hey! Someone in my Myspace group shared this site with us so I came to take a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Excellent blog and wonderful design. scoliosis surgery https://coub.com 2021/09/14 9:12 Hey! Someone in my Myspace group shared this site

Hey! Someone in my Myspace group shared this site with
us so I came to take a look. I'm definitely loving
the information. I'm bookmarking and will be tweeting this to my followers!
Excellent blog and wonderful design. scoliosis surgery
https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# Hey! Someone in my Myspace group shared this site with us so I came to take a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Excellent blog and wonderful design. scoliosis surgery https://coub.com 2021/09/14 9:13 Hey! Someone in my Myspace group shared this site

Hey! Someone in my Myspace group shared this site with
us so I came to take a look. I'm definitely loving
the information. I'm bookmarking and will be tweeting this to my followers!
Excellent blog and wonderful design. scoliosis surgery
https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# Hey! Someone in my Myspace group shared this site with us so I came to take a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Excellent blog and wonderful design. scoliosis surgery https://coub.com 2021/09/14 9:14 Hey! Someone in my Myspace group shared this site

Hey! Someone in my Myspace group shared this site with
us so I came to take a look. I'm definitely loving
the information. I'm bookmarking and will be tweeting this to my followers!
Excellent blog and wonderful design. scoliosis surgery
https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# 偽物時計 2021/11/20 6:58 qyljuzbtg@live.jp

此のヴィトンは美品で価格も安価で落札出来ました。やはり
ヴィトンはいいですね。幾つ有っても飽きがきませんから
不思議です。ブランドという魅力は怖いです!!
偽物時計 https://www.kopi66.com/product/detail.aspx-id=15338.htm

# ロレックス プリンス レビュー 2022/08/17 20:07 lvcqqncuh@goo.ne.jp

思っていたよりずっと綺麗な商品で、
とても良い買い物ができ嬉しく思います。
お店の対応もとても良く、
迅速丁寧にご対応いただきました。
ありがとうございました。
ロレックス プリンス レビュー https://www.kopijp.com/product/detail.aspx?id=290

# ロレックス 偽物 大阪 2022/09/04 4:14 upktllusmqc@ybb.ne.jp

?2022新年おめでとうございます?
品質の良いルイヴィトン商品を買います
良い専売店に行かなければなりません
ルイヴィトンコピー激安市場 腕時計/財布 専売店
貴方が来ることに値します
?素晴らしい品質
?素晴らしいサービス
?素晴らしいシンヨウ
腕時計、財布 、バッグ、小物など
当店を選ぶのは最も良いです。
オシャレな貴方は満足することができます。
ロレックス 偽物 大阪 https://www.gmt78.com/product/detail/1111.htm

# ロレックス プラチナ 2013 2022/09/04 4:14 rqtqshevl@docomo.ne.jp

きずひとつなく綺麗な品です ありがとーございました
ルイヴィトン カデナ パドロック R10007 シルバー 艶なし マット 新品 未使用 南京錠 lv-003 ルイ・ヴィトン ルイ ヴィトン ルイビトン ビトン 鍵 キー ペンダント ネックレス キーホルダー ブランド ギフト プレゼント ペンダントトップ
ロレックス プラチナ 2013 https://www.2bcopy.com/product/product.aspx-id=3539.htm

# ロレックス 中古 4wd 2022/11/21 22:48 qeilopghkqh@live.jp

日本的な人気と信頼を得ています。
安心、安全にお届けします
価格、品質、自信のある商品を取り揃えておりますので、
当店の主要な経営のブランド:(ヴィトン ) (シャネル) (ロレックス)など.
当店は主に経営する商品:かばん.バッグ .財布 .キーケース. .腕時計など.
日本には無い商品,日本では高価な商品,
弊社のない商品,取引先を代理して製造会社を連絡することができる.
弊社長年の豊富な経験と実績があり.
輸入手続も一切は弊社におまかせできます.ご希望の商品を責任を持ってお届けします.
当店の商品は特恵を与える。興味あれば、是非ご覧下さい
財布、腕時計、バッグ一品市場

# ロレックス 中古 20万 2022/11/29 20:49 njfiszkk@ybb.ne.jp

凄く丁寧に対応下さいましてありがとうございます。連絡も早くて、決済方法の変更にも快く応じて下さり・・・尚且つ、発送も早くして頂いたので誕生日に間に合いました。本当にありがとうございました
★ブルガリ ブルガリ★ブルガリ ブルガリ リング★AN855854★750(K18PG)×ダイヤモンド★サイズ54★
ずっとずっと・・・憧れ続けていたブルガリリング。ゼロワンのタイプにしようか・・・とか、何年迷い続けていたのか忘れてしまいましたが・・・10年以上は迷い続けていたと思います。
その中でも、日本限定クリスマス限定のこちらは欲しくても手に入れれなかったので諦めていたのですが、私の誕生日にと主人が購入してくれる事に。
新品とは思えない綺麗なお品で・・・箱もつぶれも汚れもなく、本当に大満足です。

# ロレックス 人気 時計 2022/11/29 20:58 cxwbtwvum@livedoor.com

もう少し愛想があれば、、、でも問題はない
★ルイヴィトン★モノグラム★ドーヴィル★ハンドバッグ★M47270★
かなり良かった
安かったので、こんなに程度がいいとは思わなかった。
正直写真よりも実物のほうが良かった。

タイトル
名前
Url
コメント