授業中に作成したプログラムを片っ端から乗っけていきです。C++ を中心に掲載中。

アドレ演算子、間接演算子を用いて、変数がどんなアドレスに割り付けられているか、次のプログラムで調べてみよ。

#include<iostream>
using namespace std;
void main(){
	int x=10;
	double y=3.14; 
	cout << x << "   " << &x << "   " << *(&x) << "\n";
	cout << y << "   " << &y << "   " << *(&y) << "\n";
	return 0;
}

10 ******** 10
3.14 ******** 3.14

このページへのコメント

XdQGC4 wow, awesome article.Really looking forward to read more. Want more.

0
Posted by stunning seo guys 2014年01月21日(火) 13:29:51 返信

YlY8nX Major thanks for the blog article.Really thank you!

0
Posted by seo thing 2013年12月19日(木) 14:41:12 返信

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Creative Commons

Creative Commons License
この作品は、クリエイティブ・コモンズ・ライセンスの下でライセンスされています。

メンバーのみ編集できます