c++ tag

886 questions


1 answers
21 views
0
I have a question for you

Number one. int main(){ int a =10, b =3, c, d; div( a, b, &c, &d); cout<< share =<<c<< rest =<d<<<endl; return 0; }Output>> Quotation = 3 Remaining = 1 Numb...

c++
2 years ago

1 answers
114 views
0
Ask how to use a string read from a file as an if statement

I'm going to write a code that separates the string I received from the txt file into if statements.Yes)This is how you create a variable and store the input string. char VecFun[10]; fpInput = fopen(i...

2 years ago

1 answers
106 views
0
Question the OnTimer function in MFC

void CChildView::OnTimer(UINT_PTR nIDEvent){ // TODO: Add message handler code here and/or call default values. if (nIDEvent == 0 && _play == true) { // // _ballCenter.x += 10; Invalidate(); ...

2 years ago

1 answers
108 views
0
Add constructor to c++ inheritance class code error

This is the process of adding a constructor to an existing inheritance class code.Continue No instance of constructor MyFriendDetailInfo::MyFriendDetailInfo matching argument listMyFriendDetailInfo:::...


1 answers
80 views
0
Question about cos and sin in math function

I'm using OpenGl, and when I'm studying, do #include<math.h> and define #define PI 3.141592 in the code. glBegin(GL_POINTS); for (double angle = 0.0; angle <= PI * 2.0; angle += PI / 30.0) { ...

2 years ago

1 answers
73 views
0
C++ Segmentation fault Exception Question.

The first code is as follows:#include <iostream>#include <vector>#include <algorithm>using namespace std;void dfs(int x, int m, bool *visited, vector<vector<int>> &g)...

2 years ago

1 answers
44 views
0
Why is it different from putting a return value of a function directly in a c++ for statement conditional expression?

#include <iostream>using namespace std;#define MAXN (100000)int N;int sol[MAXN + 10];int wp, rp = 0;int que[MAXN + 10];void push(int d) { if (wp < MAXN) { que[wp] = d; ++wp; }}int front() {...

2 years ago

1 answers
121 views
0
It's a C++ question!

I'm a C++ beginner student.I wrote a function that generates random numbers from 0 to 9, creating a two-dimensional array of four rows and three rows, and I want to express the frequency of the number...

2 years ago

1 answers
22 views
0
How to get input (.xlsx) from C++ to an Excel file?

VSCode is using g++ to solve the algorithm problem.freopen(input.txt, r, stdin);If you use freopen like above, you could easily input the txt file no matter how long the input value was. I need to inp...

c++
2 years ago

1 answers
114 views
0
Adjust the animation speed with the OnCreate function on the MFC

For example, when I'm trying to make a line move from top to bottom,int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct){ if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add speciali...

2 years ago
« - 88 - »

© 2024 OneMinuteCode. All rights reserved.