Environment settings in Data structures
Because C and C ++ are the languages that almost every university uses to teach, this series will guide you to install C and C ++ to make the environment run examples in the Data Structure series. materials and algorithms.
Installation to run on Command Prompt
If you want to install to compile and run on Command Prompt, you should read the following.
If you want to install C program, you need to use 2 software on your computer: (a) Text editor - Text Editor and (b) C compiler.
Text Editor
Used to edit programs. For example, some editor like Window Notepad, Notepad ++, vim or vi .
The names and versions of editor programs may vary according to the operating system. For example, Notepad is used on Windows, or vim or vi is used on Linux or UNIX.
The files you create in the editor are called source files and contain code programs. Files in program C are usually named with the ".c" extension.
Before starting your program, make sure you have an editor on your computer and you have enough experience to write computer programs, store them in files and execute them.
Compiler C
The source code is written in the source file in a readable form. It will be compiled into machine code, so that the CPU can execute these programs based on the written commands.
The compiler is used to compile your source code to an executable program. I assume you have a basic knowledge of a programming language compiler.
The most commonly used compiler is the GNU C / C ++ compiler, on the other hand you can have other compilers like HP or Solaris with the corresponding OS.
Below is a tutorial on how to install the GNU C / C ++ compiler on different operating systems. I am referring to C / C ++ because the GNU compiler gcc works for both C and C ++ languages.
Install on UNIX / Linux environment
If you are using Linux or UNIX , you can check the GCC set installed on your environment by the following command:
$ gcc - v
If you have the GNU installer on your computer, then it will respond to the following message:
Using built - in specs . Target : i386 - redhat - linux Configured with : ./ configure -- prefix =/ usr .. Thread model : posix gcc version 4.1 . 2 20080704 ( Red Hat 4.1 . 2 - 46 )
If the GCC is not installed, you can install it with the instructions on the link below: http://gcc.gnu.org/install/
This tutorial is written based on Linux and all examples are compiled on the Cent OS of the Linux system.
Install on Mac OS environment
If you use Mac OS X, the easiest way to get GCC is to download the Xcode development environment, you can use the GNU compiler for C / C ++.
Xcode is available under the following link: developer.apple.com/technologies/tools/.
Install on Windows
To install GCC on Windows you need to install MinGW. To install MinGW, go to www.mingw.org, and follow the instructions on this download page. Download the latest version for MinGW program, under the name of MinGW-.exe.
When installing MinWG, you must at least install gcc-core, gcc-g ++, binutils and MinGW runtime, but you can install more.
Adding the bin directory in the place where MinGW is installed into your PATH environment variable, you can directly use the tools as an easy command line.
Once the installation process is complete, you can run gcc, g ++, ar, ranlib, dlltool and other GNU tools on the Windows command line.
According to Tutorialspoint
Previous article: What is Data Structure?
Next lesson: Array data structure
You should read it
- Git environment settings
- How to install Linux on Android doesn't need root
- 5 ways to make Linux desktops look great
- How to install Deepin desktop environment on Ubuntu
- How to Install Java on Linux
- How to Install Tomcat on Windows
- How to install Windows on WinPE
- How to install Kali Linux on Android using Linux Deploy
May be interested
- 5 requirements to build strong data cultureyou may not notice but nearly all businesses in the world are increasingly interested in investing more in data analysis, big data, and especially implementing projects. ai relates to the field of activity.
- Array (Array) in C / C ++c / c ++ programming language provides data structures called arrays, stored in a set of data of the same type with fixed length. an array is used to store data sets, but it is useful if you think of an array of variables with the same type.
- How to Reset Network Settings on Androidtoday's tipsmake will show you how to delete bluetooth, mobile data, and wi-fi network settings on your android device at the same time. you can reset network settings from the settings menu. however, the settings menu will vary depending on the manufacturer and phone model you are using.
- How to Reset MacBook Prothis article shows you how to reset your macbook pro's nvram and battery settings, as well as how to erase all data on your macbook pro and restore the original settings. resetting your mac's nvram can help fix battery display errors, while battery settings can be reset when your mac often gets hot or freezes. restoring your macbook pro to factory settings will erase all data on the hard drive and reinstall the operating system.
- Git life cyclein this chapter, we will discuss git's life cycle. and in the following chapter, we learn through git commands for each activity.
- Restore settings and data on Android with Google Backupjust a few simple swipes on android that you accidentally deleted some important content such as contacts, messages or other important things in your phone. if you accidentally lose those data, don't worry, there are many applications that help retrieve those lost settings and data. in this article, tipsmake.com will guide you how to recover data on android with google backup.
- How to set up XFCE desktop environment on Arch Linuxthe default arch settings do not come with a graphical desktop because arch gives you the ability to choose. if you're new to this or looking for a suggestion, xfce is a great place to start.
- Data modeling in MongoDBdata in mongodb has a flexible schema. documents in the same collection need not have the same set of fields or structures, and common fields in collection documents can keep different data types.
- How to set and list environment variables in Linuxif you want to do something that requires using the command line, you will still need to know about environment variables. this may seem like a complicated term, but actually environment variables are easy to understand.
- How to protect your mental and physical health when in a toxic environmentdealing with toxic situations can be incredibly difficult. here are some tips to help you handle toxic environments tactfully and maintain peace of mind.