<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>C&#43;&#43; on The TARDIS Server Project</title>
		<link>https://www.tardisgallifrey.com/tags/c&#43;&#43;/</link>
		<description>Recent content in C&#43;&#43; on The TARDIS Server Project</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sat, 17 Oct 2026 11:49:44 -0500</lastBuildDate>
		
			<atom:link href="https://www.tardisgallifrey.com/tags/c++/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Easy Weekend Refactoring Java to C&#43;&#43;</title>
				<link>https://www.tardisgallifrey.com/posts/refactor/</link>
				<pubDate>Sat, 17 Oct 2026 11:49:44 -0500</pubDate>
				<guid>https://www.tardisgallifrey.com/posts/refactor/</guid>
				<description>&lt;h2 id=&#34;refactoring-from-java-to-c&#34;&gt;Refactoring from Java to C++&lt;/h2&gt;&#xA;&lt;p&gt;After several hard weeks of RL and coding, I am taking it easy this weekend.  I started a little project to increase my fluency in C++ and how to integrate it with &lt;code&gt;make&lt;/code&gt;.  I am taking some of my &lt;a href=&#34;https://github.com/tardisgallifrey/adventure&#34;&gt;adventure game&lt;/a&gt; classes and refactoring to C++.&lt;/p&gt;&#xA;&lt;p&gt;Here is the &lt;code&gt;Thing&lt;/code&gt; class as it looks in Java.&lt;/p&gt;&#xA;&lt;h4 id=&#34;thingjava&#34;&gt;Thing.java&lt;/h4&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;    &lt;button class=&#34;code-copy&#34; type=&#34;button&#34; hidden aria-label=&#34;Copy code to clipboard&#34;&gt;&#xA;      &lt;span class=&#34;code-copy-label&#34; aria-hidden=&#34;true&#34;&gt;Copy&lt;/span&gt;&#xA;    &lt;/button&gt;&#xA;    &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;import java.io.Serializable;&#xA;&#xA;public class Thing implements Serializable{&#xA;&#xA;        private String name;&#xA;        private String description;&#xA;        private boolean takable;&#xA;        private boolean movable;&#xA;&#xA;        public Thing(String name, String description, boolean takable, boolean movable){&#xA;                this.name = name;&#xA;                this.description = description;&#xA;                this.takable = takable;&#xA;                this.movable = movable;&#xA;&#xA;        }&#xA;&#xA;        public String getName(){&#xA;                return this.name;&#xA;        }&#xA;&#xA;        public String getDescription(){&#xA;                return this.description;&#xA;        }&#xA;&#xA;        public boolean getTakable(  ){&#xA;                return this.takable;&#xA;        }&#xA;&#xA;        public boolean getMovable(  ){&#xA;                return this. movable;&#xA;        }&#xA;&#xA;        public String describe(){&#xA;                return &amp;#34; Here is a &amp;#34; + this.getName() + &amp;#34;: It is&amp;#34; +  this.getDescription();&#xA;        }&#xA;&#xA;}&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&lt;p&gt;Pretty straightforward.  It is one of my base classes.  And, here is the final look in C++.  Doing it the alleged &amp;ldquo;correct&amp;rdquo; way is why there are two files, a header file and an implementation file.  Using this method, I can mirror how I do it in Java with one class per file.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
