Using Code::Blocks
- For my example I will be working with complex numbers.
- These are numbers in the form of a+bi;
- a and b are floats.
- 3+2i is a complex number.
- The only thing we will do is add these numbers.
- a+bi + c+di = (a+c) + (b+d)i
- so 1+1i + 2-4i = (1+2) + (1-4)i = 3-3i;
- Don't worry, this is not really that inportant.
- Codeblocks is an IDE
- It is cross platform.
- It is free.
- If I had to work under windows, that is what I would use.
- You want the MinGW version
- I downloaded it by goiing to
- Downloads
- Binaries
- Note there is a no-admin option if you don't have administrative privlidges.
- I grabbed codeblocks-17.12mingw-nosetup.zip
- I extracted the folder to my desktop
-
-
- Launch Codeblocks
- I told it to use MinGW
- I told it not to become the default c++ compiler
- I am using visual studios for Game Programming
- I started a project
- Console Application
- I put the application in a new folder.
- I took the default with everything else.
- I asked it for a new class
- File->new->Class
- Complex
-
- It created a header and implementation file for me.
- We can delete the destructor, and the proteted section.
- Edit the main.cpp in the project directory to change main.