{"id":107,"date":"2026-03-16T10:29:52","date_gmt":"2026-03-16T10:29:52","guid":{"rendered":"https:\/\/sites.wsagames.com\/jl9u24\/?p=107"},"modified":"2026-03-16T11:30:27","modified_gmt":"2026-03-16T11:30:27","slug":"107","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/jl9u24\/2026\/03\/16\/107\/","title":{"rendered":"Diving into C++"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As I believe that knowing C++ will come in handy in the future I have taken upon myself to learn this hellspawn of a language.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the first week I have learned the absolute bare minimum of any coding language.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;Hello World!&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n  cout &lt;&lt; \"Hello World!\";\n  return 0;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">What I learned from this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This will be painful to learn<\/li>\n\n\n\n<li>Every code in C++ should start with #include &lt;iostream&gt;\n<ul class=\"wp-block-list\">\n<li>#include meaning go grab (file) and include it<\/li>\n\n\n\n<li>&lt;iostream&gt; &#8211; the file that contains input\/output tools<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>using namespace std; &#8211; I want to use the standard library tools without typing the full name every time\n<ul class=\"wp-block-list\">\n<li>instead of <br>std :: cout &lt;&lt; &#8220;Hello&#8221;;<\/li>\n\n\n\n<li>shortens to<\/li>\n\n\n\n<li>cout &lt;&lt; &#8220;Hello&#8221;;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>semi colons are a must and will haunt me in the near future<\/li>\n\n\n\n<li>to end a statement I should use\n<ul class=\"wp-block-list\">\n<li>return 0;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Other things:\n<ul class=\"wp-block-list\">\n<li>int &#8211; return type. main returns an integer to the operating system when the program finishes.<\/li>\n\n\n\n<li>main &#8211; a special reserved function name that the OS looks for to start the program<\/li>\n\n\n\n<li>() &#8211; the parameter list. \n<ul class=\"wp-block-list\">\n<li>can include:\n<ul class=\"wp-block-list\">\n<li>int argc<\/li>\n\n\n\n<li>char*<\/li>\n\n\n\n<li>argv[]<\/li>\n\n\n\n<li>etc<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>{} &#8211; where the code goes into<br><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Other functions that was learned in the first week of C++<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cout is pronounced as see out<\/li>\n\n\n\n<li>cin is for user input\n<ul class=\"wp-block-list\">\n<li>cin &gt;&gt; x;\n<ul class=\"wp-block-list\">\n<li>&gt;&gt; &#8211; for input<\/li>\n\n\n\n<li>int x &#8211; to define x<\/li>\n\n\n\n<li>; &#8211; the damn semi colon<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\/\/ can be used anywhere as long as it isn&#8217;t literally in the middle of the code (eg: cou\/\/t), it is used for comments<\/li>\n\n\n\n<li>Types of variables\n<ul class=\"wp-block-list\">\n<li>int &#8211; integers (whole numbers)\n<ul class=\"wp-block-list\">\n<li>int number = 67;<\/li>\n\n\n\n<li>cout &lt;&lt; number;\n<ul class=\"wp-block-list\">\n<li>output: 67<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>double &#8211; floating point numbers (2.12 etc etc)\n<ul class=\"wp-block-list\">\n<li>double decimalNumber = 6.7;<\/li>\n\n\n\n<li>cout &lt;&lt; decimalNumber;\n<ul class=\"wp-block-list\">\n<li>output: 6.7<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>char &#8211; single characters (lower and upper case)\n<ul class=\"wp-block-list\">\n<li>char character = E;<\/li>\n\n\n\n<li>cout character;\n<ul class=\"wp-block-list\">\n<li>output: E<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>string &#8211; text\n<ul class=\"wp-block-list\">\n<li>string wholeText = Meme<\/li>\n\n\n\n<li>cout &lt;&lt; wholeText;\n<ul class=\"wp-block-list\">\n<li>output: Meme<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>bool &#8211; true or false\n<ul class=\"wp-block-list\">\n<li>bool bullShit = true;\n<ul class=\"wp-block-list\">\n<li>bullShit is true<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I believe that knowing C++ will come in handy in the future I have taken upon myself to learn this hellspawn of a language. In the first week I have learned the absolute bare minimum of any coding language. The &#8220;Hello World!&#8221; What I learned from this: Other functions that was learned in the [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-107","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-personal"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/posts\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":4,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/posts\/107\/revisions\/204"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/media\/138"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/jl9u24\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}