208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323

Что изучать для совершенствования знаний по C++

08.11.2018, 09:25. Показов 20640. Ответов 361

Студворк — интернет-сервис помощи студентам
Изучил уже до ООП, вопрос что делать дальше? Могу ли я уже писать программы, с чего начинать?
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
08.11.2018, 09:25
Ответы с готовыми решениями:

Что изучать после получения базовых знаний по c#
В каком направлении дальше двигаться? Или попытаться устроиться стажером для начала? А там дальше скажут в каком направлении двигаться...

Какой язык и технологию изучать после получения средних знаний
Здравствуйте! Я сейчас в 9 классе, буду поступать в техникум...Хорошие знания C#.NET, LINQ, ADO.NET, скоро буду начинать учить ASP.NET, и...

Ссылки для изучения и совершенствования
Ha всякий случай, несколько ссылок, больше на Rutracker. He знаю других трекеров c поиском в этих категориях. Темы c наибольшим спросом...

361
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
03.01.2019, 12:56  [ТС]
Студворк — интернет-сервис помощи студентам
8Observer8,
I long time, registr on GitHub, only for what? My profile - https://github.com/RuslanSagdeev
I now dowonload Git, only for what?

Добавлено через 7 минут
8Observer8,
Please, install Git and register on GitHub. I will show you some commands that will make our team-work more comfortable.
I long time, registr on GitHub, only for what? My profile - https://github.com/RuslanSagdeev
I now dowonload Git, only for what?

You can build your game to an executable file (.exe). You need to select "Release" in VS.
I don't can found it's but.



I so want, create main menu, to regular settings, and connect to game.
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
03.01.2019, 13:15
Цитата Сообщение от CyberGame Посмотреть сообщение
I now dowonload Git, only for what?
dowonload --> download
We will start Snake2D Game from scratch. I will create an empty project and explain how to clone one. We will learn how to write games with TDD methodology from scratch. If you develop a game with somebody you need to know how to use Git. It is very useful.

What is from scratch:
If you do something from scratch, you do it without making use of anything that has been done before.
Building a home from scratch can be both exciting and challenging...

Source Dictionary: "Collins COBUILD Dictionary on CD-ROM 2006"

Цитата Сообщение от CyberGame Посмотреть сообщение
How can import game, to my friends can play it's game?
A little task for you. You need to build your game in EXE and attach to a message.
  • Select "Release" mode in "Tool Bar" of VS:
    Название: ReleaseInVS.png
Просмотров: 68

Размер: 2.1 Кб
  • Build the project. You will see these files in Release folder:
    Название: ReleaseFiles.png
Просмотров: 67

Размер: 3.2 Кб
  • Add these files to an archive and attach to a message
0
03.01.2019, 13:27

Не по теме:

Цитата Сообщение от CyberGame Посмотреть сообщение
I don't can found
"Can" is a modal verb. A negative form in the Present Tense is "I cannot find" and "I couldn't find" - in the Past Tense.

0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
03.01.2019, 15:09
We have this rule:
11. Картинки и любые другие файлы загружайте на форум, во избежание их удаления или потери на сторонних ресурсах. По этой же причине коды программ также должны находиться на форуме.
When we give a link to the project on GitHub we need to attach archive. You can download a current project from GitHub by clicks on this buttons:


I make this start project: https://github.com/8Observer8/... penGL11Cpp
Snake2D_FreeGlutOpenGL11Cpp-master.zip

You need to clone this project. Try search in Google how to clone a project from GitHub. You can ask me if you don't understand how to make it.
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
03.01.2019, 15:18
When you clone it you need to open .sln file. You will see two projects:
Название: SelectProject.png
Просмотров: 67

Размер: 5.3 Кб

You need to set the second project as a startup project. For this you need to click on the second project with Right Mouse Button and select "Set as StartUp Project".

Run Snake2D.UnitTests. For this you need to press "Ctrl+F5". When you complete this task I will describe the next task.
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
04.01.2019, 12:12  [ТС]
8Observer8,
Stop, i don't can import my snake, becouse i don't found 'Realse'
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 12:21
I have this it Tool Bar in VS2015:


Do not you see it in VS2017?

Добавлено через 1 минуту
When you switch from "Debug" to "Release" you need to Build a project. After this you will find "Release" folder in your solution folder.
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
04.01.2019, 12:29  [ТС]
You need to clone this project. Try search in Google how to clone a project from GitHub. You can ask me if you don't understand how to make it.
I serfing in google 'how clone project from github'

GitHub
https://help.github.com/articl... epository/
I do then. Next, where clone?
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
04.01.2019, 12:37  [ТС]
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 12:59
Please, search in Google: how to set release mode in visual studio 2017
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 13:05
Setting "Release" mode in 2015 is very simple by I don't know how to set it in 2017



But you need return back "Debug" Mode after you build a project to release because you will debug.
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 13:10
Цитата Сообщение от CyberGame Посмотреть сообщение
I do then. Next, where clone?
Go to Snake2D project. Open "main.cpp". You will see this code:
C++
1
2
3
4
5
6
7
#include <iostream>
 
int main()
{
    std::cout << "hello, world" << std::endl;
    return 0;
}
Add a new line, for example:
C++
1
2
3
4
5
6
7
8
#include <iostream>
 
int main()
{
    std::cout << "hello, world" << std::endl;
    std::cout << "Second line" << std::endl;
    return 0;
}
Make a commit and push your changes on GitHub:
git commit -m "added a second line"
git push -u origin master
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 14:15
When I build in a release in 2015 I find "Release" folder here, see a screenshot below. I don't know where will be "Release" folder in 2017.

Название: ReleaseFolder.png
Просмотров: 57

Размер: 6.5 Кб
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
04.01.2019, 15:46  [ТС]
8Observer8,
How do, to create folder 'Release'???!!?!
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
04.01.2019, 15:49  [ТС]
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 16:40
Цитата Сообщение от CyberGame Посмотреть сообщение
How do, to create folder 'Release'???!!?!
It is very simple. You need to set "Release" mode and build your project. "Release" folder will be created automatically.

How to build a project:

0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
04.01.2019, 16:45


Excellent!

Now you need to complete the second part of this task:
Цитата Сообщение от 8Observer8 Посмотреть сообщение
Make a commit and push your changes on GitHub
Enter these commands in the terminal:

git commit -m "added a second line"
git push -u origin master
We test how to send your work on GitHub. It is a goal.
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
04.01.2019, 23:55  [ТС]
8Observer8,
It's very good. If i not have internet and use code, will compelate my code, and you see his.

second party task? It's use my code game snake?
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
05.01.2019, 01:52
Цитата Сообщение от CyberGame Посмотреть сообщение
second party task? It's use my code game snake?
I want to see the code (see a screenshot below) on GitHub, here: https://github.com/8Observer8/... penGL11Cpp



You made a clone of this project: Snake2D_FreeGlutOpenGL11Cpp

You made changes. I what you sent this changes back on GitHub.

Enter this command in terminal:
git commit -m "added a second line"
And this:
git push -u origin master
I am going to see your chages and accept these changes. Then I will give a next task.

Добавлено через 4 минуты
This is the second part of the task:
Цитата Сообщение от 8Observer8 Посмотреть сообщение
Enter these commands in the terminal:
0
9987 / 2959 / 497
Регистрация: 05.10.2013
Сообщений: 8,102
Записей в блоге: 243
05.01.2019, 15:31
We cannot work with a computer graghics and we cannot make even simple games without understanding of basic of linear algebra.

You need to shearch in Google:
  • linear algebra for computer graphics
  • linear algebra for game developers

For example, you can read this: https://learnopengl.com/Gettin... formations

A very good and simple description of basic of linear algebra you can read in this book: WebGL Programming Guide

You can run examples from the book from the first message of my theme.

Цитата Сообщение от CyberGame Посмотреть сообщение
How can import game, to my friends can play it's game?
You can rewrite your game to JavaScript and WebGL (or TypeScript and WebGL - it is better). In this case everybody can run your simple game in one click in browser from Windows, Mac, Linux and even Android and iOS. You can embed your game in social network like Facebook or VK and will be able to use their API's. It is very simble to add multiplayer into your games by Node.js/Socket.io with hosting on Heroku. I can help you, it is very simple.

Добавлено через 20 минут
If you understand WebGL you will understand how to rewrite a code to C++ and shader OpenGL 3+.

See how a little code you need to write to draw a square. You can public your examples on jsfiddle or plnkr. You and anyone can open your result and edit it. It is very effective way to learn computer graphics, shader OpenGL, general programming, linear algebra, physics and so on.

In this example I set a position for a square with glMatrix. glMatrix is library for linear algebra.

JSFiddle full screen



index.html

PHP/HTML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <title>WebGL 1.0. Translate a square using glMatrix</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.4.0/gl-matrix-min.js"></script>
    <style>
        #renderCanvas {
            border: 5px solid #aaaaaa;
        }
    </style>
</head>
 
<body>
    <canvas id="renderCanvas" width="250" height="250"></canvas>
 
    <script>
        var vertexShaderSource =
            `attribute vec2 a_Position;
            uniform mat4 u_ModelMatrix;
 
            void main()
            {
                gl_Position = u_ModelMatrix * vec4(a_Position, 0.0, 1.0);
            }`;
 
        var fragmentShaderSource =
            `precision mediump float;
            uniform vec3 u_Color;
 
            void main()
            {
                gl_FragColor = vec4(u_Color, 1.0);
            }`;
 
        var gl = document.getElementById("renderCanvas").getContext("webgl");
 
        var vShader = gl.createShader(gl.VERTEX_SHADER);
        gl.shaderSource(vShader, vertexShaderSource);
        gl.compileShader(vShader);
 
        var fShader = gl.createShader(gl.FRAGMENT_SHADER);
        gl.shaderSource(fShader, fragmentShaderSource);
        gl.compileShader(fShader);
 
        var program = gl.createProgram();
        gl.attachShader(program, vShader);
        gl.attachShader(program, fShader);
        gl.linkProgram(program);
        gl.useProgram(program);
 
        var vertices = new Float32Array([
            -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5
        ]);
 
        var vbo = gl.createBuffer();
        gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
        gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
 
        var a_Position = gl.getAttribLocation(program, "a_Position");
        gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);
        gl.enableVertexAttribArray(a_Position);
 
        var u_Color = gl.getUniformLocation(program, "u_Color");
        gl.uniform3f(u_Color, 0.635, 0.450, 0.125);
 
        var modelMatrix = mat4.create();
        mat4.translate(modelMatrix, modelMatrix, vec3.fromValues(0.3, 0.3, 0.0));
 
        var u_ModelMatrix = gl.getUniformLocation(program, "u_ModelMatrix");
        gl.uniformMatrix4fv(u_ModelMatrix, false, modelMatrix);
 
        gl.clearColor(0.898, 0.984, 0.905, 1.0);
        gl.clear(gl.COLOR_BUFFER_BIT);
 
        gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
    </script>
</body>
 
</html>
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
05.01.2019, 15:31

Какой язык изучать или что изучать?
Здравствуйте форумчане. какой язык программирования изучать чтоб работать дома через интернет? может 1с? я сам живу в деревне работы нет,о...

Подскажите, как лучше всего изучать язык, ежели в академии не дают достаточный объем знаний
хожу на курсы в академию уже 3 месяца, изучаем С++ по либерти, практики нету вообще, просто примеры по книге набираем...в общем туго идет,...

Какие паттерны можно использовать для совершенствования приложения
Доброго времени суток! У меня есть приложение реализованное на Qt C++ - тестирование студентов. Суть приложения заключается в...

Что изучать для работы
Всем здравствуйте. Ребята, такой вопрос. Какие технологии сейчас лучше изучать, чтобы было проще и быстрее, и при этом чтобы можно было...

Что изучать для создания сайтов
Привет всем, всех с новым годом! кто занимается web - разработкой, создание сайтов , хотелось у вас узнать ко э что. В каком порядки...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
320
Ответ Создать тему
Опции темы

Новые блоги и статьи
Часы электронные
Uhbif79 12.08.2026
Выкладываю программу часов. Программа позволяет: 1. Использовать системное время и дату, 2. Есть возможность вводить время и дату вручную. 3. Реализованы 2 будильника: начало и конец рабочего дня. . . .
Часы с будильником на основе класса QLCDNumber
Uhbif79 12.08.2026
Всем добрый день, выкладываю программу часов с будильником на основе класса QLCDNumber. Здесь я пробовал самостоятельно создавал классы, впервые столкнулся с видимостью переменной одного класса из. . .
Установка MinGW GCC 16.2 и CMake
8Observer8 10.08.2026
VK Видео: https:/ / vkvideo. ru/ video-240781534_456239017 YouTube: eY5-5PyI9NM Текстовая версия
Неделя из жизни имитационной модели склада: мои кривые руки растут, откуда надо
anaschu 10.08.2026
Неделя из жизни имитационной модели склада: как я почти написал неправильную логику и что с этим делать Работаю сейчас над учебно-рабочим проектом: строю в AnyLogic имитационную модель процессов. . .
Калькулятор для расчета родства
russiannick 07.08.2026
1. Задача: Создать калькулятор для расчета родства. Родственных связей существует 8 ступеней, такие как: p - отец P - мать q - муж Q - жена b - брат B - сестра s - сын S - дочь
Мир по моей воле
kumehtar 07.08.2026
Когда-то кажется, что всё просто. Ты весь такой светлый. Причиняешь добро. Борешься за справедливость в этом тёмном мире. Потом начинаешь замечать одну неприятную вещь. Почти каждый хороший. . .
Кредитный калькулятор
Maks 05.08.2026
Решение задачи по прикладной информатике средствами 1С. Задача: Напишите приложение-калькулятор, которое помогает рассчитывать параметры кредита для аннуитетного и дифференцированного видов. . .
У нас сейчас поговорку "Опять 25" нужно переделать на "Опять +35".
kumehtar 04.08.2026
С ностальгией вспоминаю времена моего детства, когда у нас и правда +25 - была максимальная температура летом. Раньше +25 °C реально казались вершиной жары, когда можно было весь день пропадать на. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru