<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>c++ Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Fri, 18 Oct 2019 00:58:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Overwrite in Windows 10. A program that overwrites empty space on the disk.</title>
		<link>https://www.osradar.com/overwrite-in-windows-10-a-program-that-overwrites-empty-space-on-the-disk/</link>
					<comments>https://www.osradar.com/overwrite-in-windows-10-a-program-that-overwrites-empty-space-on-the-disk/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Fri, 18 Oct 2019 00:58:24 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[compilation]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[overrwrite]]></category>
		<category><![CDATA[visual studio code]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14745</guid>

					<description><![CDATA[<p>Hello, I hope you&#8217;re all right! Today we are going to talk about security. Specifically we&#8217;ll see about hard disk space. The white space inside them contains sensitive information that can be recovered later putting our security and privacy at risk. This happens because every time we erase information or even format a disk, it [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/overwrite-in-windows-10-a-program-that-overwrites-empty-space-on-the-disk/">Overwrite in Windows 10. A program that overwrites empty space on the disk.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, I hope you&#8217;re all right! Today we are going to talk about security. Specifically we&#8217;ll see about hard disk space. The white space inside them contains sensitive information that can be recovered later putting our security and privacy at risk. This happens because every time we erase information or even format a disk, it is not completely erased, but remains potentially unaltered. In other words, the empty space on hard drives on Windows or any SO doesn&#8217;t stay that way. For that reason, the information can be retrieved later. </p>



<p>So imagine for a moment that you lose access to your hard drive. All your personal information could be exposed, even if you took the precaution of deleting it. Sounds a little scary, doesn&#8217;t it? However, they have just released a program whose main function is to overwrite the blank space you have on a hard drive. In this way, the information really remains blank, making it impossible to recover it later. In fact, the name of the program is <a rel="noreferrer noopener" aria-label="Overwrite (opens in a new tab)" href="https://ivoprogram.github.io/content/en/index.html?content=overwrite.html&amp;fbclid=IwAR1Fd9p2yO9ILS66eugwUk_Ba28JcOGwoHGltq1_iQ0YTEpwwJL0Ro0-Acw" target="_blank">Overwrite</a>. A very interesting tool. So here we show you how to install Overwrite for the empty space of the disks in Windows 10.</p>



<h2>Compiling Overwrite with Visual Studio Code</h2>



<p>Overwrite is a program written in C language, which is contained in a single file. It can be compiled on different platforms, but here we are going to compile for Windows 10. With that in mind, we are going to use Visual Studio Code. To know how to install it please check our <a rel="noreferrer noopener" aria-label="post (opens in a new tab)" href="https://www.osradar.com/how-to-install-and-configure-visual-studio-code-in-windows-10/" target="_blank">post</a>. In the same way, we&#8217;ll need a C/C++ Compiler, for this example I&#8217;m going to use MinGW. The installation process is simple, just go to this address and download the <a href="https://sourceforge.net/projects/mingw/files/">installer</a>.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over-1024x728.jpg" alt="Download MinGW for Windows " class="wp-image-14747" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/10/over-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/10/over-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Download MinGW for Windows </figcaption></figure>



<p>Then double click on the installer. When the wizard starts, select all the options for a basic installation. Next, wait for the wizard to download all the necessary files and proceed to install them. This will take a few minutes, depending on your internet connection.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over2-1024x728.jpg" alt="Installing MinGW for Windows" class="wp-image-14749" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over2.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/10/over2-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over2-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over2-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/10/over2-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over2-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Installing MinGW for Windows</figcaption></figure>



<h2>Add MinGW to the environment variables.</h2>



<p>Next, we&#8217;ll add the compiler to the Windows environment variables. This is very important because it will allow you to compile from any CMD without going to the address of the program. Also, the Run Code extension of the editor uses the command prompt of Windows to run the compiler. To find out how to do this, I invite you to check out our post about <a rel="noreferrer noopener" aria-label="Wget (opens in a new tab)" href="https://www.osradar.com/how-to-install-wget-in-windows-10/" target="_blank">Wget</a> in Windows 10. Here I simply show you the already added variable:</p>



<figure class="wp-block-image"><img loading="lazy" width="526" height="500" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over3.jpg" alt="Adding MinGW environment variable" class="wp-image-14751" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over3.jpg 526w, https://www.osradar.com/wp-content/uploads/2019/10/over3-300x285.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over3-442x420.jpg 442w" sizes="(max-width: 526px) 100vw, 526px" /><figcaption>Adding MinGW environment variable</figcaption></figure>



<p>to check that everything has been installed correctly, please press the &#8220;Win+R&#8221; combination, and run CMD to open a Command Pro.</p>



<figure class="wp-block-image"><img loading="lazy" width="402" height="210" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over4.jpg" alt="Run a cmd" class="wp-image-14753" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over4.jpg 402w, https://www.osradar.com/wp-content/uploads/2019/10/over4-300x157.jpg 300w" sizes="(max-width: 402px) 100vw, 402px" /><figcaption>Run a cmd</figcaption></figure>



<p>In the command prompt please type the following command:</p>



<pre class="wp-block-preformatted">gcc</pre>



<figure class="wp-block-image"><img loading="lazy" width="979" height="512" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over5.jpg" alt="Running MinGW compiler" class="wp-image-14754" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over5.jpg 979w, https://www.osradar.com/wp-content/uploads/2019/10/over5-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over5-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over5-696x364.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over5-803x420.jpg 803w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Running MinGW compiler</figcaption></figure>



<p>If running the command throws the error that there are no input files, then we are ready to move on. </p>



<h2>Install the extensions in Visual Studio Code.</h2>



<p>Now we need to add the necessary extensions to compile in C in Visual Studio Code. With this in mind, open the program. And in the Marketplace write C++ and Code Runner, and proceed to download and install them.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over7-1-1024x728.jpg" alt="Adding the necessary extensions" class="wp-image-14756" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over7-1.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/10/over7-1-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over7-1-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over7-1-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/10/over7-1-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over7-1-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Adding the necessary extensions</figcaption></figure>



<p>All right, we&#8217;re ready to compile the program. The first thing we need to do is to download the package from <a href="https://github.com/ivoprogram/overwrite" target="_blank" rel="noreferrer noopener" aria-label="here (opens in a new tab)">here</a></p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over8-1024x728.jpg" alt="Download Overwrite program" class="wp-image-14757" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over8.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/10/over8-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over8-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over8-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/10/over8-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over8-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Download Overwrite program</figcaption></figure>



<p>Once downloaded, please remember the location of the download and open Visual Studio Code. Once there, in the left column in Explore, locate the folder where you downloaded the program and click on overwrite.c. Then on the menu on the right press Run.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over6-1024x728.jpg" alt="Overwrite finally compiled" class="wp-image-14758" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over6.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/10/over6-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over6-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over6-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/10/over6-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over6-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Overwrite finally compiled</figcaption></figure>



<h2>Testing Overwrite</h2>



<p>Finally, we have compiled Overwrite, as you can see in the previous screen, there is already an executable file for windows. However, this program does not have a graphical interface but must be executed in a CMD. In addition, it is necessary to open a Command Prompt at the location of the program. To avoid this complication, we will add the environment variable.</p>



<figure class="wp-block-image"><img loading="lazy" width="527" height="501" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over9.jpg" alt="Adding environment variable" class="wp-image-14759" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over9.jpg 527w, https://www.osradar.com/wp-content/uploads/2019/10/over9-300x285.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over9-442x420.jpg 442w" sizes="(max-width: 527px) 100vw, 527px" /><figcaption>Adding environment variable</figcaption></figure>



<p>Uses of Overwrite</p>



<pre class="wp-block-preformatted">overwrite [-h -v -test -one -rand -block:] (-files: &amp;| -data:) -path: 
-h             Print help and usage message. 
-v             Print program version. 
-test          For test, don't delete written files. 
-one           Overwrite with 1, default with 0. 
-rand          Overwrite with random data, default with 0. 
-block         Block size, default 4096 bytes as NTFS and EXT4. 
-files         Number of files to write, block size each. 
-data          Quantity of data to write, ex: 1mb, 1gb, all. 
-path          Path to directory where to write data. </pre>



<p>Let&#8217;s use a practical example. Write 10 files and 10Mb data, on Windows C drive.</p>



<pre class="wp-block-preformatted"> overwrite -files:10 -data:10mb -path:c:\ </pre>



<figure class="wp-block-image"><img loading="lazy" width="979" height="512" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/over10.jpg" alt="Running Overwrite in Windows 10" class="wp-image-14760" srcset="https://www.osradar.com/wp-content/uploads/2019/10/over10.jpg 979w, https://www.osradar.com/wp-content/uploads/2019/10/over10-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/10/over10-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/10/over10-696x364.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/10/over10-803x420.jpg 803w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Running Overwrite in Windows 10</figcaption></figure>



<p>Obviously, there are several commands we can use to run the tool. Very well, we have learned how to install Overwrite for the empty space of the disks in Windows 10. And also, we have seen how to compile C in Visual Studio Code. I hope you enjoyed this tutorial as much as I did. See you next time.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/overwrite-in-windows-10-a-program-that-overwrites-empty-space-on-the-disk/">Overwrite in Windows 10. A program that overwrites empty space on the disk.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/overwrite-in-windows-10-a-program-that-overwrites-empty-space-on-the-disk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The V programming Language: Powerfull and lightweight</title>
		<link>https://www.osradar.com/the-v-programming-language-powerfull-and-lightweight/</link>
					<comments>https://www.osradar.com/the-v-programming-language-powerfull-and-lightweight/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Mon, 01 Jul 2019 23:40:53 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[New version]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming language]]></category>
		<category><![CDATA[V programming language]]></category>
		<category><![CDATA[window]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12539</guid>

					<description><![CDATA[<p>Programming languages are currently in a good stage of development. Many of them have been improved and as time goes by, they incorporate features that help the coding process. However, there is always room for advancement and some venture to create new languages in the hope that they will be taken into account by the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/the-v-programming-language-powerfull-and-lightweight/">The V programming Language: Powerfull and lightweight</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Programming languages are currently in a good stage of development. Many of them have been improved and as time goes by, they incorporate features that help the coding process. However, there is always room for advancement and some venture to create new languages in the hope that they will be taken into account by the developers. That is how Python started and now it is one of the most popular languages out there. Now, another is emerging with a view to being one of the lightest and most efficient out there. So, in this post, I will tell you about the V programming Language.</p>
<h2>Lightweight and very efficient</h2>
<p><a href="https://vlang.io/" rel="noopener">This programming language</a> was created by Alex Medvedniko, a Dutch developer who says he has a strong commitment to simplicity and performance. You can see that in V. Because V and all its libraries only occupy 400kb. Crazy! But yes, the language has ambitions and only with this size will we be able to work.</p>
<p>On the other hand, the language is in an early stage of development, but it shows us characteristics to which we must pay a lot of attention. Some of them are:</p>
<ul>
<li><strong>Secure</strong>. Because it does not allow global variables, null values, strange behaviors of functions, nor undefined values.</li>
<li><strong>Fast</strong>. I think this is V&#8217;s main point. It can compile 1.5 Million lines of code per processor core. It&#8217;s wonderful.</li>
<li><strong>Code translation from C</strong>. If you have a project from C, you can convert the source code to V, without any problem.</li>
<li><strong>Compiler with 0 dependencies</strong>. In addition, it only weighs 400 kb.</li>
<li><strong>Hot Code Reload</strong>. It is not necessary to compile frequently to get the desired changes. Of course, in some cases yes, where there are many lines of codes.</li>
</ul>
<p>Finally, the programming language V will have version 1.0 in December if all goes well. However, you can already do some work using it.</p>
<h2>Getting the V programming Language</h2>
<p>As expected, V is open-source. For now, only Linux and MacOS versions are available, but Windows will soon be added. Just download it and put it in <code>/usr/local/bin/</code> to start working. You can also download the<a href="https://github.com/vlang/v"> source code</a> and build it from there.</p>
<p>In addition, the project tells us that it is easier to use than <a href="https://www.osradar.com/install-go-language-on-centos-7/">GO</a>, but that it has similar documentation. On the other hand, its performance is similar to <a href="https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/">C</a> and they plan to<strong> support graphics libraries like <a href="https://www.khronos.org/vulkan/">Vulkan</a> or DirectX.</strong></p>
<p>For now, we just need to keep an eye on this project. If you are a developer I recommend you do the same because the features are interesting.</p>
<p>Share this post with other friends of yours whether they are developers or not.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/the-v-programming-language-powerfull-and-lightweight/">The V programming Language: Powerfull and lightweight</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/the-v-programming-language-powerfull-and-lightweight/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Here is Codeblocks IDE. A simple IDE for C++/ Fortran</title>
		<link>https://www.osradar.com/install-codeblocks-on-linux/</link>
					<comments>https://www.osradar.com/install-codeblocks-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 25 Oct 2018 01:00:29 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=6695</guid>

					<description><![CDATA[<p>If you are a C++ developer and you use Linux, then this tutorial is for you, because I will introduce you Codeblocks an open source IDE designed for this popular programming language and for Fortran. Some time ago I was talking to you about how to compile C++ on Linux. This served as a gateway [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-codeblocks-on-linux/">Here is Codeblocks IDE. A simple IDE for C++/ Fortran</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you are a C++ developer and you use Linux, then this tutorial is for you, because I will introduce you Codeblocks an open source IDE designed for this popular programming language and for Fortran.</p>
<p>Some time ago I was talking to you about <a href="https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/" target="_blank" rel="noopener">how to compile C++ on Linux</a>. This served as a gateway for many programming enthusiasts. However, I think you should start with the first thing. What is C++?</p>
<p>In short, C++ is a compiled programming language that supports object-oriented programming. With this language <a href="http://www.lextrait.com/vincent/implementations.html" target="_blank" rel="noopener">many important applications</a> have been created such as Microsoft Office, <a href="https://www.libreoffice.org/" target="_blank" rel="noopener">LibreOffice</a> and more than half of <a href="https://mariadb.org/" target="_blank" rel="noopener">MariaDB</a>.</p>
<h2>Codeblocks to write code better</h2>
<p>To write code optimally, it is best to do it with an IDE. Many times choosing the right IDE can reduce coding times and improve the way software is built.</p>
<p>With this in mind is that Codeblocks arises, to be highly configurable and adaptable to each of the developers. It is also supports the Fortran language which although less popular than C++ is still used for educational and scientific purposes. In addition, it has Code completion, class browser and smart indent.</p>
<p>Codeblocks is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html" target="_blank" rel="noopener">GPL3</a> license which guarantees that it is open source and can be installed on various operating systems such as Windows, Mac OS and of course for Linux.</p>
<h2>Codeblocks features</h2>
<p>There are many features that make Codeblocks a fantastic IDE. These are some of them:</p>
<ul>
<li>Open Source. That means it&#8217;s <strong>free</strong>, no tricks, nothing like that. Ideal if you&#8217;re learning to program and don&#8217;t want to pay for IDE.</li>
<li><strong>Cross-platform</strong>. It can be installed on Windows, Mac Os and Linux. However, the fact that it can be installed on Linux is enough, isn&#8217;t it?</li>
<li>Does not require external libraries because it is written in C++.</li>
<li>Thanks to the plugins you can extend their functionalities.</li>
</ul>
<p>It is compatible with many compilers such as GCC, clang or Digital Mars.</p>
<h2>Install Codeblocks on Linux</h2>
<p>The installation of Codeblocks on Linux is very simple. You should go to <a href="http://www.codeblocks.org/downloads/26" target="_blank" rel="noopener">this</a> link and select the binary you want. If you use Debian, Ubuntu or one of their derivatives, then you must choose the .deb format. If you use Fedora, openSuse or CentOS 7, then .rpm.</p>
<p>In this case, I will install Codeblocks on a Debian 9 system, so I will choose to download the .deb packages.</p>
<p><figure id="attachment_6696" aria-describedby="caption-attachment-6696" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6696" src="https://www.osradar.com/wp-content/uploads/2018/10/1-18.png" alt="1.- Downloading Codeblocks" width="1366" height="666" srcset="https://www.osradar.com/wp-content/uploads/2018/10/1-18.png 1366w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-1068x521.png 1068w, https://www.osradar.com/wp-content/uploads/2018/10/1-18-861x420.png 861w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-6696" class="wp-caption-text">1.- Downloading Codeblocks</figcaption></figure></p>
<p>Once the file has been downloaded and decompressed. Proceed to install them by terminal. The content of the downloaded file I have put in a folder called <em>codeblocks</em>.</p>
<p>Then, open a terminal, locate it in the directory and run:</p>
<pre class="">:~$ cd codeblocks
:~$ sudo dpkg -i *.deb</pre>
<p><figure id="attachment_6697" aria-describedby="caption-attachment-6697" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6697" src="https://www.osradar.com/wp-content/uploads/2018/10/2-17.png" alt="2.- Installing all packages" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/10/2-17.png 1366w, https://www.osradar.com/wp-content/uploads/2018/10/2-17-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/10/2-17-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/10/2-17-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/10/2-17-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2018/10/2-17-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/10/2-17-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-6697" class="wp-caption-text">2.- Installing all packages</figcaption></figure></p>
<p>In case you have any unfulfilled package or dependency. Run:</p>
<pre class="">:~$ sudo apt --fix-broken install</pre>
<p><figure id="attachment_6698" aria-describedby="caption-attachment-6698" style="width: 811px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6698" src="https://www.osradar.com/wp-content/uploads/2018/10/3-18.png" alt="3.- Fixing the broken packages" width="811" height="533" srcset="https://www.osradar.com/wp-content/uploads/2018/10/3-18.png 811w, https://www.osradar.com/wp-content/uploads/2018/10/3-18-300x197.png 300w, https://www.osradar.com/wp-content/uploads/2018/10/3-18-768x505.png 768w, https://www.osradar.com/wp-content/uploads/2018/10/3-18-696x457.png 696w, https://www.osradar.com/wp-content/uploads/2018/10/3-18-741x486.png 741w, https://www.osradar.com/wp-content/uploads/2018/10/3-18-639x420.png 639w" sizes="(max-width: 811px) 100vw, 811px" /><figcaption id="caption-attachment-6698" class="wp-caption-text">3.- Fixing the broken packages</figcaption></figure></p>
<p>Finally, open it from the main menu.</p>
<p><figure id="attachment_6699" aria-describedby="caption-attachment-6699" style="width: 800px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6699" src="https://www.osradar.com/wp-content/uploads/2018/10/4-1.jpg" alt="4.- Codeblocks on Debian 9" width="800" height="450" srcset="https://www.osradar.com/wp-content/uploads/2018/10/4-1.jpg 800w, https://www.osradar.com/wp-content/uploads/2018/10/4-1-300x169.jpg 300w, https://www.osradar.com/wp-content/uploads/2018/10/4-1-768x432.jpg 768w, https://www.osradar.com/wp-content/uploads/2018/10/4-1-696x392.jpg 696w, https://www.osradar.com/wp-content/uploads/2018/10/4-1-747x420.jpg 747w" sizes="(max-width: 800px) 100vw, 800px" /><figcaption id="caption-attachment-6699" class="wp-caption-text">4.- Codeblocks on Debian 9</figcaption></figure></p>
<p>And that&#8217;s it.</p>
<h2>Conclusion</h2>
<p>The process of making a program is not simple, it requires a lot of time and tools to make available to the developer a series of features to help in this process. Fortunately there is Codeblocks, a free, multi-platform tool full of ready to use features.</p>
<p>Tell us, are you a C++ developer? Or Fortran? How was your experience with this IDE?</p>
<p>Please spread this article through your social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-codeblocks-on-linux/">Here is Codeblocks IDE. A simple IDE for C++/ Fortran</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-codeblocks-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Compile a C++ code on GNU/LINUX?</title>
		<link>https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/</link>
					<comments>https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 17 Aug 2018 05:39:22 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=5321</guid>

					<description><![CDATA[<p>There is always a worldwide debate among developers about which operating system to choose to create work applications, but in recent times GNU/LINUX has become a major share of use in this segment because its flexibility, cost, security and compatibility with most programming languages have made it a solid alternative for work. C++ are programming [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/">How to Compile a C++ code on GNU/LINUX?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There is always a worldwide debate among developers about which operating system to choose to create work applications, but in recent times GNU/LINUX has become a major share of use in this segment because its flexibility, cost, security and compatibility with most programming languages have made it a solid alternative for work.</p>
<p>C++ are programming languages well known for the vast amount of programs created with them, in addition to their long history in the world of computers, which is why it serves as an entry language for all those who want to learn programming from the beginning.</p>
<p>GNU/LINUX and C++ is an ideal combination if you want to learn programming at a low cost</p>
<h3>1.- Installing compiler and others libraries</h3>
<p>If we want to write and compile a code, we must have installed the compiler of that language, additionally we can also install other libraries associated with the language to extend its functionality. Open a terminal and log in as root user and then:</p>
<p>For Debian and Ubuntu:</p>
<pre class="">:~# apt install build-essential</pre>
<p>On Opensuse LEAP and Tumbleweed</p>
<pre class="">:~# zypper install -t pattern devel_C_C++</pre>
<p>For CentOS 7:</p>
<pre class="">:~#yum groupinstall 'Development Tools'</pre>
<p><figure id="attachment_5322" aria-describedby="caption-attachment-5322" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5322" src="https://www.osradar.com/wp-content/uploads/2018/08/1-4.png" alt="1.- installing build-essential" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/1-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/1-4-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/1-4-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/1-4-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/1-4-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/1-4-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/1-4-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5322" class="wp-caption-text">1.- installing build-essential</figcaption></figure></p>
<p>The above commands not only install the C++ compiler <strong>which is g++</strong> but also other tools for building packages.</p>
<p>&nbsp;</p>
<h3>2.- Creating the .cpp files</h3>
<p>We have large editors to create our text files, from integrated in the terminal (nano, vi&#8230;), complete IDE (netbeans, eclipse) or text editors (atom, komodo, visual code), depending on the taste of each one, but as we are going to compile from the terminal, we will use <strong>nano</strong>.</p>
<pre class="">:~$ nano helloworld.cpp</pre>
<p>And in it we started to write our code for example:</p>
<pre class="">#include&lt;iostream&gt;
using namespace std;
     int main(){
        cout&lt;&lt;"Hello World";
        return 0;
      }</pre>
<p>Then we save and close and go to the console to compile the file.</p>
<p><figure id="attachment_5323" aria-describedby="caption-attachment-5323" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5323" src="https://www.osradar.com/wp-content/uploads/2018/08/2-5.png" alt="2.- Coding on nano" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/2-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/2-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/2-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/2-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/2-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/2-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/2-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5323" class="wp-caption-text">2.- Coding on nano</figcaption></figure></p>
<h3>3.- Compiling the code</h3>
<p>Now we save and exit nano with ctr+x and invoke g+++, that is, the C++ compiler. Write:</p>
<pre class="">:~$ g++ -o executable helloworld.cpp</pre>
<p>We explain briefly, g+++ is the compiler; -or is a flag option that indicates that the next element is the name of the executable; executable is the name of the binary that is generated after compiling the file, you can put the name you want; helloworld.cpp is the name of the.cpp file that is going to be compiled, you can also indicate an absolute path of a file.</p>
<p>If the code is spelled correctly and without errors, when executing that command we should not have any output messages.</p>
<p><figure id="attachment_5324" aria-describedby="caption-attachment-5324" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5324" src="https://www.osradar.com/wp-content/uploads/2018/08/3-5.png" alt="3.- using g++" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/3-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/3-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/3-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/3-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/3-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/3-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/3-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5324" class="wp-caption-text">3.- using g++</figcaption></figure></p>
<p>Product of the previous command an executable is generated.</p>
<h3>4.- Run a c++ program from an executable in the terminal</h3>
<p>To run an executable file created by g+++ on a terminal, type the following:</p>
<pre class="">:~$ ./file_name</pre>
<p><figure id="attachment_5325" aria-describedby="caption-attachment-5325" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5325" src="https://www.osradar.com/wp-content/uploads/2018/08/4-4.png" alt="4.- Executing a code" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/4-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/4-4-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/4-4-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/4-4-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/4-4-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/4-4-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/4-4-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5325" class="wp-caption-text">4.- Executing a c++ code</figcaption></figure></p>
<p>In some cases we can find compatibility errors with g+++ when using many specific functions within our code, for this we will use:</p>
<pre class="">:~$ g++ -std=c++11 -o executable helloworld.cpp</pre>
<p>and the problem should be solved.</p>
<h3>Compile with g+++ a program that requires libraries</h3>
<p>The above example we compiled a simple code, but what if we want to compile one that requires other libraries?</p>
<p>First we will create 3 files, the first one will be the main one, then we will make the library and the code of that library. To do this we will make a main code that simply multiplies two numbers, but using an external library.</p>
<pre class="">:~$ nano main.cpp</pre>
<p>In it we write:</p>
<pre class="">#include&lt;iostream&gt;
#include"library1.h"
using namespace std;
int main(){
int result = multiplication(1,1);
cout &lt;&lt; "result is: " &lt;&lt; result &lt;&lt; "\n";
return 0;

}
</pre>
<p><figure id="attachment_5327" aria-describedby="caption-attachment-5327" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5327" src="https://www.osradar.com/wp-content/uploads/2018/08/5-5.png" alt="5.- Creating the &quot;main&quot; cpp file" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/5-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/5-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/5-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/5-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/5-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/5-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/5-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5327" class="wp-caption-text">5.- Creating the &#8220;main&#8221; cpp file</figcaption></figure></p>
<p>Now we&#8217;ll do the.h file from the library</p>
<pre class="">:~$ nano library1.h</pre>
<p>And inside the editor we place the following content</p>
<pre class=""><span class="pl-k">int</span> <span class="pl-en">multiplication</span>(<span class="pl-k">int</span>,<span class="pl-k">int</span>);</pre>
<p><figure id="attachment_5328" aria-describedby="caption-attachment-5328" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5328" src="https://www.osradar.com/wp-content/uploads/2018/08/6-4.png" alt="6.- Creating the second file" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/6-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/6-4-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/6-4-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/6-4-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/6-4-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/6-4-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/6-4-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5328" class="wp-caption-text">6.- Creating the second file</figcaption></figure></p>
<p>we finally created the last file:</p>
<pre class="">:~$ nano library1.cpp</pre>
<p>And here&#8217;s what we put in:</p>
<pre class="">#include"biblioteca1.h"

int multiplication(int a, int b){
return a+b;

}
</pre>
<div class="mceTemp"></div>
<p><figure id="attachment_5330" aria-describedby="caption-attachment-5330" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5330" src="https://www.osradar.com/wp-content/uploads/2018/08/7-5.png" alt="7.- Creating the third file" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/7-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/7-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/7-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/7-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/7-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/7-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/7-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5330" class="wp-caption-text">7.- Creating the third file</figcaption></figure></p>
<p>Now we proceed with the compilation:</p>
<pre class="">:~$ g++ -Wall main.cpp libreary1.cpp -o executable2</pre>
<p>We proceed to explain: unlike the previous example, we add the -Wall option so that it shows us all the warnings that occur during the compilation; then we compile all the.cpp that are really the sources of the program; and with the instruction -o we point to the output file.</p>
<p><figure id="attachment_5331" aria-describedby="caption-attachment-5331" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5331" src="https://www.osradar.com/wp-content/uploads/2018/08/8-3.png" alt="8.- Compiling several .cpp files" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/8-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/8-3-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/8-3-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/8-3-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/8-3-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/8-3-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/8-3-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5331" class="wp-caption-text">8.- Compiling several .cpp files</figcaption></figure></p>
<p>Now we run:</p>
<pre class="">:~$ ./executable2</pre>
<p><figure id="attachment_5332" aria-describedby="caption-attachment-5332" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5332" src="https://www.osradar.com/wp-content/uploads/2018/08/9-5.png" alt="9.- Running the output file" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/9-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/9-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/9-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/9-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/9-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/9-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/9-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5332" class="wp-caption-text">9.- Running the output file</figcaption></figure></p>
<p>And that&#8217;s it. As we can see it is easy to compile files with g+++ and GNU/LINUX, we would need to learn all the options that the compiler gives us from the terminal, although for that we would need another article.</p>
<p>Please, spread this article through social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/">How to Compile a C++ code on GNU/LINUX?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-compile-a-c-code-on-gnu-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
