python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why does this code malform a reference access to an stl vector?
I have, what I think is a very basic Cpp program:
// tmp.cpp
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <set>
#include <iost...
Makogan
Votes: 0
Answers: 0
Program not taking expected Input, can't find out why
This program should take input a,b equal to the value of t, instead it seems to only take one input and then deliver the output.
For example, the inputs of:
3
1 2
100 200
40 15
leads only to an o...
vitrify
Votes: 0
Answers: 2
Why did I write the declaration into the main function that the program does not run
When I write the following three lines of code into the main function, the program will not run.
const int N = 500005;
long long a[N]={0};
long long b[N]={0};
At first, I thought it was a problem wit...
Sophia912
Votes: 0
Answers: 1
scanf ends my program and no error is thrown
I am a beginner in C and I encountered problems when dealing with scanf, hoping for an explanation behind this
this is my code
#include <stdio.h>
#include <math.h>
#include <string.h>...
Electron X
Votes: 0
Answers: 3