c++ tag

886 questions


1 answers
45 views
0
Free() function in C language

Use malloc() and free() when dynamically allocating memory in C language.One question is, how does the free function know the memory size dynamically allocated using malloc and solve the dynamic alloc...

c c++
2 years ago

1 answers
103 views
0
When using C++ Shared Memory (Memory mapped) DLLs in C++ & C#

Create DLLs in Project X (C++); Project X defines functions that read and write data using MemoryMapped.Project Y uses a DLL called X Enter data mainly (C++);Project Z uses a DLL called X Mainly read ...

2 years ago

2 answers
26 views
0
I'm a c++ beginner.I have a basic question.

Finally uni in the following code.What would be the value of i? Let's answer in hexadecimal. union UNI { int i; char c; } } uni; uni.i = 0x12345678; uni.c = 0x90; Answer: Changing the value of 0x1234...

c++
2 years ago


1 answers
33 views
0
Error writing recursive function calls.

#include <iostream>#include <string>std::string reverseParentheses(std::string s) { int strLen = (int)(s.size()); int parStart = 0; int parEnd = 0; int parInnerLen = 0; int isParExist = 0;...

c++
2 years ago

1 answers
104 views
0
In Visual Studio 2017, it runs in Debug mode, but an error appears in release mode

#include <SFML/Graphics.hpp>If you run the phrase in release mode, you can't read it I don't know why it works in debug but not in release

2 years ago

1 answers
27 views
0
When I receive the date, what should I do to include it?

When you enter the date, you can use it on November 11, 2018 Is there anything I need to write separately if I want to receive it including dots?

c++
2 years ago

1 answers
31 views
0
Hello, I am a student who is learning C language. I'm asking you a question regarding the code.

#include <stdio.h>#include <stdlib.h>#define WIDTH 512#define HEIGHT 512 // WIDTH, defined as 512 for each HEIGHTTypeef unsigned char BYTE; // Express unsigned char as BYTE int main(){ FLE...

2 years ago

3 answers
25 views
0
Can the c++ function be generated as a probability?

For example, A(), B(), C()There is a function like this. A() function occurs with a 10% probabilityB() Samsu occurs at 20% and C() at 30%.Is there a way to squeeze it like this?

c++
2 years ago

1 answers
26 views
0
C++ stoi() function and exception handling

std::string str = 129380129831213981;int conv = std::stoi(str);Running this code causes an Out of range exception because the number you are trying to convert exceeds the range of int.So I wrote a try...

c++
2 years ago
« - 46 - »

© 2024 OneMinuteCode. All rights reserved.