c++ tag

886 questions


3 answers
379 views
0
How to Overwrite a Text File in C++

I would like to overwrite the text file while turning the while loop in C++ as follows.In the code below, the letter text is added as texttext.What should I do to overwrite it?#define TEMP_FILE_NAME \...

c++
1 years ago

3 answers
343 views
0
How to Overwrite a Text File in C++

I would like to overwrite the text file while turning the while loop in C++ as follows.In the code below, the letter text is added as texttext.What should I do to overwrite it?#define TEMP_FILE_NAME \...

c++
1 years ago

4 answers
316 views
0
Regarding the flow when returning class variables

I would like to ask you about the flow of processing when returning class variables in c++.For example, class Hoge {// Class Implementation};Hoge func(){ Hoge fuga; // Creating a fuga return std::move...

c++
1 years ago

1 answers
439 views
0
I want to console every time I receive it on a UDP socket.

Creating UDP sockets in C++.The current one is that the server stores messages in a buffer and displays them all together. I'd like to display them on the console every time I receive them for debuggi...

1 years ago

2 answers
368 views
0
Heap-buffer-overflow occurs when trying to implement adjacency lists

Code below in Darwin environmentc++-std=c++17-g3-fsanitize=address main.cc&./a.out results in heap-buffer-overflow.After trying various things, it seems that the symptom is probably occurring in G...

c++
1 years ago

1 answers
238 views
0
When I write a two-dimensional array in AtCoder, I cannot determine the cause of RE (execution time error) in some problems.

Heap-buffer-overflow occurs when trying to implement adjacency listsThis is a continuation of the problem I asked you about on this link, but I have not been able to determine the cause of the RE (run...

c++
1 years ago

2 answers
353 views
0
When you try to implement an adjacency list, you get heap-buffer-overflow.I don't know the cause.

using namespace std;void solve() { int N,Q; cin>>N>Q; vector<vector>int>>G(N); for(inti=0;i<Q;i++){ int T, A, B; cin>>T>>A>>B; if(T==1){ auto itr = find(G...

c++
1 years ago

1 answers
308 views
0
I'd like to know how to give the proper speed to fly a Unity engine airplane using physical operations.

The presentation code is the script that is attached to the airplane.I'd like to fly an airplane using physics.If you press the space key in this state, it will not move, but if you press the space an...

c++
1 years ago

1 answers
323 views
0
I want to know how to use assert() correctly in asset loading.

Regarding assert(0) inside if(scene==nullptr), is this the correct way to use assert?I think there are three main ways to get errors: printf(), assert and text file log. If there is no data, what is t...

c++
1 years ago

0 answers
417 views
0
It's an opencvc++ question I'm trying to mark it according to the moving video, but the video doesn't play

int main() { VideoCapture capture; capture.open(pipoball.avi); CV_Assert(capture.isOpened()); double frame_rate = capture.get(CAP_PROP_FPS); int delay = 1000 / frame_rate; Mat frame; int nofrm = 0; Po...

1 years ago
« - 6 - »

© 2024 OneMinuteCode. All rights reserved.