Nikkster
Programmer
Hi people!
First of all, I'm not a expert programmer, I'm a student (the same as you are) but I am more than glad to share the experience I already have in C/C++ with my fellow OpenTibia community.
First of all; What is C/C++ good for and how many jobs are there available for C++ programmers?
If I'm not wrong, there are around 5000 jobs available for C++ programmers, so it's a good job and you will get paid good. Good programmers usually have $3000/month in salary, so definitely not a bad thing to go for if you like computers and would like to get a little bit closer your processor & RAM etc.
Let's start.
Lesson 1: Your first program
In this lesson, my point is that you will come a little bit closer on how written C/C++ programs looks like. Some language constructs demonstrates and commented upon but far from all possibilities in C.
Now we are going to learn the most basic and how you create your first program in a terminal (usually MSDOS if you're using Windows) and terminal if you're using Linux. However, we can start by downloading a C/C++ compiler which is called: DEVC++ for windows users. You can download the software here: The Dev-C++ Resource Site
Once you have downloaded the program, create a new project and start the compiler. We start by writing the sources, write this:
Then save the project. (Make sure that you don't need a compiler to make a program like this, you can use notepad ++ for this, but save the program as "exl.c". But after that, you need the compiler to compile the code (translate) it, then open the file in your compiler program and execute the code. A MSDOS window will popup and launch the code.
You will see this in your MSDOS or terminal after opening the .exe program you just have created. Many people will probably wonder "But what is the /n for?, well, for you who knows some about HTML, it's the same like a <br>. So if you would type anything after the /n command, it will be like this:
Results:
Another thing which is equal to the command "printf" is "echo" as probably some of you have already heard about, for an example in PHP, you can either write this to be able to show a test
or you can use printf instead of echo, it would be the same thing.
In next lesson, I will explain more about variables in C/C++ programming, why they are good to know about.
Have a nice day!
Best Regards,
Nikkster
First of all, I'm not a expert programmer, I'm a student (the same as you are) but I am more than glad to share the experience I already have in C/C++ with my fellow OpenTibia community.
First of all; What is C/C++ good for and how many jobs are there available for C++ programmers?
If I'm not wrong, there are around 5000 jobs available for C++ programmers, so it's a good job and you will get paid good. Good programmers usually have $3000/month in salary, so definitely not a bad thing to go for if you like computers and would like to get a little bit closer your processor & RAM etc.
Let's start.
Lesson 1: Your first program
In this lesson, my point is that you will come a little bit closer on how written C/C++ programs looks like. Some language constructs demonstrates and commented upon but far from all possibilities in C.
Now we are going to learn the most basic and how you create your first program in a terminal (usually MSDOS if you're using Windows) and terminal if you're using Linux. However, we can start by downloading a C/C++ compiler which is called: DEVC++ for windows users. You can download the software here: The Dev-C++ Resource Site
Once you have downloaded the program, create a new project and start the compiler. We start by writing the sources, write this:
Code:
#include <stdio.h>
int main ()
{
printf("Hi people! This is what I have learnt so far from Nikkster's C++ school. \n");
return 0;
}
You will see this in your MSDOS or terminal after opening the .exe program you just have created. Many people will probably wonder "But what is the /n for?, well, for you who knows some about HTML, it's the same like a <br>. So if you would type anything after the /n command, it will be like this:
Code:
#include <stdio.h>
int main()
{
printf("Hi people! This is what I've learnt from Nikkster's c++ school /n I rock");
return 0;
}
Code:
Hi people! This is what I've learnt from Nikkster's c++ school
I rock!
PHP:
<?php
$mytext="Hi people! This is what I have learnt from Nikkster's C++ school.";
echo $mytext;
?>
In next lesson, I will explain more about variables in C/C++ programming, why they are good to know about.
Have a nice day!
Best Regards,
Nikkster