<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinya_game_app</author_name>
  <author_url>https://blog.hatena.ne.jp/shinya_game_app/</author_url>
  <blog_title>Flat Leon Works</blog_title>
  <blog_url>https://flat-leon.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>技術</anon>
  </categories>
  <description>条件演算子のメリット 条件演算子の使いどころ 条件演算子ではなくif文を使うべきところ 条件演算子を入れ子にする 条件演算子の注意点 演算子の優先順序に気をつける 結果の型は同じである必要がある 三項演算子という呼び方 まとめ 条件演算子のメリット 条件演算子はif文とは違い式なので、必ず結果を伴います。なのでif文とは違い、変数の初期化やreturn文での値の返却などで使うことができます。またif文よりも記述がシンプルになるので楽に書くことができ、また読みやすくなります。 条件演算子の使いどころ 変数の初期化、代入 return文 関数の引数 このように条件により違う値を設定する場面で活躍し…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fflat-leon.hatenablog.com%2Fentry%2Fcpp_conditional_operator&quot; title=&quot;【C++】条件演算子いろいろ - Flat Leon Works&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-03-10 14:15:12</published>
  <title>【C++】条件演算子いろいろ</title>
  <type>rich</type>
  <url>https://flat-leon.hatenablog.com/entry/cpp_conditional_operator</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
