Форум программистов, компьютерный форум, киберфорум
С++ для начинающих
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск  
 
 
Рейтинг 4.72/76: Рейтинг темы: голосов - 76, средняя оценка - 4.72
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323

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

08.11.2018, 09:25. Показов 19524. Ответов 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
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
22.01.2019, 18:58
Цитата Сообщение от Azazel-San Посмотреть сообщение
some rendering bugs in Firefox 64.0(only on this version)? Actually I get a gray color texture in Firefox but in Chrome/Safari/Edge everything is ok.
Could you public a demo here? http://playcode.io/
0
Mental handicap
 Аватар для Azazel-San
1246 / 624 / 171
Регистрация: 24.11.2015
Сообщений: 2,429
22.01.2019, 19:07
Цитата Сообщение от 8Observer8 Посмотреть сообщение
Could you public a demo here? http://playcode.io/
Actually it will maybe difficult to reproduce because of that I getting textures from online source and maybe Firefox broke not webgl but textures what I get, hm.. Well, it was rather a rhetorical question, maybe you heard something about it.
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
22.01.2019, 20:02
Цитата Сообщение от Azazel-San Посмотреть сообщение
I getting textures from online source
Could you give links to the textures? It will be good if you will make demo without unnecessary things. Maybe isn't a size of textures the power of 2?

You can public your example like this. I made a simple example:

https://playcode.io/227714?tab... tml&output



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
<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <title>WebGL 1.0. Applying a texture to a square</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 type="x-shader/x-vertex" id="VertexShader">
        attribute vec2 a_Position;
        attribute vec2 a_TexCoord;
        uniform mat4 u_ModelMatrix;
        varying vec2 v_TexCoord;
        
        void main()
        {
            gl_Position = u_ModelMatrix * vec4(a_Position, 0.0, 1.0);
            v_TexCoord = a_TexCoord;
        }
    </script>
 
    <script type="x-shader/x-fragment" id="FragmentShader">
        precision mediump float;
        uniform sampler2D u_Sampler;
        varying vec2 v_TexCoord;
 
        void main()
        {
            gl_FragColor = texture2D(u_Sampler, v_TexCoord);
        }
    </script>
 
    <script src="main.js"></script>
</body>
main.js

JavaScript
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
82
83
84
85
86
87
88
89
90
91
function main()
{
    var gl = document.getElementById("renderCanvas").getContext("webgl");
 
    // Get shader elements
    var vShaderElement = document.getElementById("VertexShader");
    var fShaderElement = document.getElementById("FragmentShader");
    // Get shader sources
    var vShaderSource = vShaderElement.firstChild.textContent;
    var fShaderSource = fShaderElement.firstChild.textContent;
 
    // Create shaders
    // Vertex shader
    var vShader = gl.createShader(gl.VERTEX_SHADER);
    gl.shaderSource(vShader, vShaderSource);
    gl.compileShader(vShader);
    // Check the vertex shader
    var vInfo = gl.getShaderInfoLog(vShader);
    if (vInfo.length > 0)
    {
        console.log(vInfo);
    }
 
    // Fragment shader
    var fShader = gl.createShader(gl.FRAGMENT_SHADER);
    gl.shaderSource(fShader, fShaderSource);
    gl.compileShader(fShader);
    // Check the fragment shader
    var fInfo = gl.getShaderInfoLog(fShader);
    if (fInfo.length > 0)
    {
        console.log(fInfo);
    }
 
    var program = gl.createProgram();
    gl.attachShader(program, vShader);
    gl.attachShader(program, fShader);
    gl.linkProgram(program);
    gl.useProgram(program);
 
    var verticesAndTexCoords = new Float32Array([
        -0.5, 0.5, 0.0, 1.0, // (x, y), (u, v)
        -0.5, -0.5, 0.0, 0.0,
        0.5, 0.5, 1.0, 1.0,
        0.5, -0.5, 1.0, 0.0
    ]);
 
    var vbo = gl.createBuffer();
    gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
    gl.bufferData(gl.ARRAY_BUFFER, verticesAndTexCoords, gl.STATIC_DRAW);
 
    var FSIZE = verticesAndTexCoords.BYTES_PER_ELEMENT;
 
    var a_Position = gl.getAttribLocation(program, "a_Position");
    gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 4 * FSIZE, 0);
    gl.enableVertexAttribArray(a_Position);
 
    var a_TexCoord = gl.getAttribLocation(program, "a_TexCoord");
    gl.vertexAttribPointer(a_TexCoord, 2, gl.FLOAT, false, 4 * FSIZE, 2 * FSIZE);
    gl.enableVertexAttribArray(a_TexCoord);
 
    var image = new Image();
 
    image.onload = function()
    {
        gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);
        gl.activeTexture(gl.TEXTURE0);
 
        var texture = gl.createTexture();
        gl.bindTexture(gl.TEXTURE_2D, texture);
        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, image);
 
        var u_Sampler = gl.getUniformLocation(program, "u_Sampler");
        gl.uniform1i(u_Sampler, 0);
 
        var modelMatrix = mat4.create();
        mat4.scale(modelMatrix, modelMatrix, vec3.fromValues(1.5, 1.5, 1.5));
 
        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);
    };
    image.crossOrigin = "";
    image.src = 'https://dl.dropboxusercontent.com/s/xi091ya34qqzda2/lightblueflower.jpg';
}
main();
0
 Аватар для COKPOWEHEU
4057 / 2692 / 432
Регистрация: 09.09.2017
Сообщений: 11,990
23.01.2019, 09:37
Цитата Сообщение от 8Observer8 Посмотреть сообщение
I translate from English to English (not to Russian). I use Monolingual Dictionaries. This technic is very popular. It means you need to forget Russian.
It may be a good way if you have enough words in your dictionary. But if I can not understand just 10 words how can I understand the translation from English to English?
And if you just want to translate the text, you may forget translation / meaning of unknown word. It is the problem if number of known words less than unknown ones.
I mean your method is to learning some language step-by-step, not for translating "just now"
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
23.01.2019, 13:01
Цитата Сообщение от COKPOWEHEU Посмотреть сообщение
But if I can not understand just 10 words how can I understand the translation from English to English?
I think CyberGame knows more than 10 words. I do not say that he must delete all English-Russian dictionaries. I say that he should try use English-English dictionaries (Oxford dictionaries) and try not remember Russian translations. It is very important to imagine a meaning of the English word. You need try to think in English at least 1 or 5 minute in a day. It is difficult for me too because I studied German at school and at University. I use English-Russian too but I try to use English-English dictionaries and I try to remember English meaning without Russian translation. I try to think in English without translations Russian-English in my head. It is very difficult special at fist time but it is very popular and effective way. I just try to do it everyday. I know maybe 300-400 words. I use English-Russian dictionary sometimes but I try do not use it. I just try not remember Russian translations I try to imagine the word.

For example, I have "The New Oxford Picture Dictionary". I study words everyday with this dictionary. But I do not translate words to Russian. I remember this words without translations. I imagine the words. Very offten I do not know how to say a word in Russian and I think it is very good. I do not try to translate it in Russian. I do not know how to say this word in Russian (see a picture above). I did not see this thing in Russia. I do not have this thing when I was a kid. But I just remember this word like "walker":

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

Размер: 128.7 Кб
0
151 / 86 / 35
Регистрация: 05.08.2017
Сообщений: 257
23.01.2019, 19:11
Цитата Сообщение от 8Observer8 Посмотреть сообщение
I did not see
See - irregular verb. I think you have to use "saw" here, because it is past tense
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
23.01.2019, 20:40
Цитата Сообщение от Resistanse Посмотреть сообщение
See - irregular verb. I think you have to use "saw" here, because it is past tense
No, "I did not see" is correct. It is negative sentence.

1
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
23.01.2019, 22:30
Цитата Сообщение от 8Observer8 Посмотреть сообщение
It is negative sentence.
Sometimes I forget about articles: "It is a negative sentence."
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
28.01.2019, 13:57
CyberGame, I had these ideas. I wanted to show you:
  • how to work with GitHub together. How to create repositories, add commits, push/pull changes from/to GitHub
  • how to use Trello together for current and future tasks
  • how to use TDD (Test-Driven Development) for game development using GoogleTest and GoogleMock frameworks
  • how to solve tasks from CodeWars using TDD

Now I want to use C#/OpenTK, TypeScript/WebGL and JS/ES5/WebGL for study game architectures, linear algebra, math for writing shaders, multiplayer, writing my own little game engine and so on. I chose OpenTK because it is not dead and it is used by MonoGame and Xamarin. I study ES5 because it is popular and TS because it is better then ES5 and similar to C#. TS and C# was created by Anders Hejlsberg. I want to make a little games for practice with multiplayer using: SocketIO (or WebSockets), NodeJS, MondoDB.

I am writing now my own game engine using TDD. I use NUnit and NSubstitute frameworks for C# version of my engine. And I use Jasmine framework for TypeScript and JS/ES5 for writing of WebGL versions of my game engine. WebGL is very good for little simple games like Snake and so on. The games will be ran on all planforms without installation.

I read these books:
Author of C# book is a very skilled person:

Daniel Schuller is a British-born computer game developer who has worked
and lived in the United States, Singapore, Japan, and is currently working in
the United Kingdom. He has released games on the PC as well as the Xbox 360
and PlayStation 3. Schuller has developed games for Sony, Ubisoft, Naughty
Dog, RedBull, and Wizards of the Coast, and maintains a game development
website at http://www.godpatterns.com. In addition to developing computer
games, Schuller also studies Japanese and is interested in Artificial Intelligence,
cognition, and the use of games in education.
My current process:

0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
28.01.2019, 14:07
TDD is very big theme and very interesting theme. It is used for writing Technical Specifications. It is very easy to use TDD with C#, TypeScript and JavaScript. But TDD is more complicated for using with C++. C++ is very hard language for writing your own little game engines for simple games.
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
18.02.2019, 16:08
CyberGame, I see that you switched to Python. I think it is very good idea because Python is simpler than C++ for beginners.

Did you hear about "Rubber duck debugging"?Use this method if you need to study something. When you try to explain something to somebody and you will understand and remember it better.

I want to explain you how you can create a window using Python and GLFW and how to draw graphics using OpenGL. You can translate this code to C++ later. OpenGL code in Python and in C++ is very similar.

For example, glClearColor(float r, float g, float b, float a) function sets a color for clearing the render canvas. See how OpenGL Python is similar to OpenGL C++:

Python
1
glClearColor(0.0, 1.0, 0.0, 1.0)
C++
1
glClearColor(0.0, 1.0, 0.0, 1.0);
Documentation:
0
261 / 111 / 53
Регистрация: 22.01.2017
Сообщений: 448
18.02.2019, 16:34
Цитата Сообщение от 8Observer8 Посмотреть сообщение
CyberGame, I see that you switched to Python. I think it is very good idea because Python is simpler than C++ for beginners.
С самого начала же предлагал:
Цитата Сообщение от n1b1ru Посмотреть сообщение
CyberGame, пиши на питоне, если язык знаком, в чем проблема?
PyGame самое то для начала.
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
18.02.2019, 16:51
CyberGame, I recommend you to study general programming through programming of simple games. Write a snake in Python. But use GLFW for creating window and for handling mouse/keyboard events. Use PyOpenGL because it will be simpler to switch to GLFW + OpenGL + C++ later if you will want.

And it will not be a problem to switch to this tools:
  • C# + OpenTK + OpenGL
  • Java + LWJGL + GLFW + OpenGL

It is simpler to start with OpenGL in Python than in C++. You need to type commands in the console terminal (you need to run the console terminal as administrator):
pip install GLFW
pip install PyOpenGL
pip install Pyrr
pip install NumPy
Pyrr - for trigonometry and linear algebra
NumPy - for arrays
You will see these stuffs in tutorial below.

Now you are ready to create simple games in Python and OpenGL. See this video tutorial about basics of OpenGL. You can start from the second lesson: Modern OpenGL programming in Python - part 02 - creating a GLFW window

Youtube


How to create an empty window using GLFW. Copy this file, place glfw3.dll (glfw3.dll.zip) with "main.py" and run: python main.py

main.py

Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import glfw
 
def main():
 
    # Initialize glfw
    if not glfw.init():
        return
 
    window = glfw.create_window(800, 600, "My OpenGL Window", None, None)
 
    if not window:
        glfw.terminate()
        return
 
    glfw.make_context_current(window)
 
    while not glfw.window_should_close(window):
        glfw.poll_events()
        glfw.swap_buffers(window)
 
    glfw.terminate()
 
if __name__ == "__main__":
    main()
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
18.02.2019, 20:03  [ТС]
8Observer8,
I think, to fasten info, need comment every line. ( On Russia )
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
18.02.2019, 20:08
Цитата Сообщение от CyberGame Посмотреть сообщение
I think, to fasten info, need comment every line. ( On Russia )
In English only. I sure that you did not open the video tutorial above. The author explain very slow and show everything. You can repeat, try and understand. But you do not want.
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
18.02.2019, 20:15  [ТС]
Цитата Сообщение от 8Observer8 Посмотреть сообщение
Youtube
8Observer8, I open video and don't understand.
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
18.02.2019, 20:28  [ТС]
8Observer8, Название: Снимок.PNG
Просмотров: 45

Размер: 2.1 Кб
My pyCharm don't see library, but i install all.
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
18.02.2019, 21:26
Цитата Сообщение от CyberGame Посмотреть сообщение
I open video and don't understand.
You do not need to understand what he says. I need to repeat what he makes.

Цитата Сообщение от CyberGame Посмотреть сообщение
My pyCharm don't see library, but i install all.
Maybe it is normal. Use CMD or "Far Manager" (I use it) to run your programs. Send me an error message when you run.

Добавлено через 46 минут
Цитата Сообщение от 8Observer8 Посмотреть сообщение
My pyCharm don't see library, but i install all.
"don't" --> "doesn't"
"library" --> "the library" or "this library" (or better "these libraries")

These books are very good:
0
208 / 95 / 15
Регистрация: 27.07.2018
Сообщений: 323
19.02.2019, 22:05  [ТС]
8Observer8,
Traceback (most recent call last):
File "C:/Users/Руслан/PycharmProjects/BotTelegramm/snake.py", line 1, in <module>
from OpenGL.GL import *
ModuleNotFoundError: No module named 'OpenGL'
0
9949 / 2950 / 497
Регистрация: 05.10.2013
Сообщений: 8,030
Записей в блоге: 242
20.02.2019, 00:57
Цитата Сообщение от CyberGame Посмотреть сообщение
from OpenGL.GL import *
ModuleNotFoundError: No module named 'OpenGL'
It looks like you did not install PyOpenGL.

Check what you installed using command:
pip freeze
Do you see this line?
PyOpenGL==3.1.0
If you do not see it then write this command:
pip install PyOpenGL
P.S. You will see another errors with FreeGLUT but I know how to solve them.

CyberGame, maybe is it better to create a new theme in Python section? For example, name it: Writing OpenGL Snake Game in Python. Public a link of new theme in this theme.
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
20.02.2019, 00:57

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

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

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

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

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


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

Или воспользуйтесь поиском по форуму:
360
Ответ Создать тему
Новые блоги и статьи
Программа для com-порта
Uhbif79 05.06.2026
Всем привет, давно хотел изучить Qt, начинал, бросал, потом снова начинал. И сейчас вот смог написать свою первую программу. До этого имел опыт программирования микроконтроллеров, писал прошивки на. . .
Транскрипция 55-минутного видео через Whisper: WhisperDesktop облажался, спас Google Colab[
anaschu 01.06.2026
Понадобилось получить текст из свежезагруженного видео на YouTube. Казалось бы, задача на пять минут. Заняла полтора часа. Делюсь опытом — может кому пригодится последовательность решений. . . .
21 мат мед. Планы на развитие модели здравоСохранения
anaschu 01.06.2026
AnyLogic: план развития симуляционной модели рабочего коллектива — динамический абсентеизм, реальные данные, три сценария сравнения Продолжаю серию постов о дискретно-событийной модели рабочего. . .
20. Мат мед. Абсентеизм как отдельный тип простоя
anaschu 29.05.2026
Апдейт модели: исправленные баги, абсентеизм и новые механизмы Продолжаю развивать ранее описанную модель рабочего коллектива на AnyLogic. За последние несколько дней был проведён серьёзный. . .
19. здоровье, усталость и психотип работника влияют на производительность предприятия, и наоборот, производительность на здоровье, усталось и психотип
anaschu 28.05.2026
Дискретно-событийная модель рабочего коллектива на AnyLogic: здоровье, выгорание, психотипы и микростимуляция Привет, коллеги. Хочу поделиться итогами нескольких недель работы над симуляционной. . .
"Прокси" для последовательного порта
Eddy_Em 28.05.2026
Эту штуку написал я достаточно давно. Но сейчас вот понадобилось настроить датчик грозы, но при этом не отключать его от "метеодемона". Соответственно, надо запустить этот "прокси": метеодемон будет. . .
Рефакторинг программы уравнивания.
Massaraksh7 26.05.2026
Пример по предыдущей записи в блоге. Но, надо заметить, что, во-первых, там оптимизация не только математики, но и работы с базой данных, и с графами, а во-вторых, это ещё не всё.
Использование TThread в Lazarus для математических вычислений.
Massaraksh7 25.05.2026
Производя рефакторинг своих программ на предмет ускорения их работы, обратил внимание на такой аспект, как сокращение времени матвычислений. Дело в том, что приходится работать с большими матрицами. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru