Tom
Anonymous
yeah.
(mpesabalance >= 200 && mpesabalance < 500)
You should not add a semicolon after the if and else if condition.
klimi
klimi
why are you being rude to him?
Anonymous
And what did I do? I just deleted the message without replying. Read rule number 9 in the group rules. I can ban you for DMing me without asking me first.
There is no hard and fast rule here that every question here must be answered. You are not paying us to answer your questions.
klimi
cooper
peaceful
Ludovic 'Archivist'
Anonymous
You can directly use the hashes without needing to rehash them and sha1 is pretty standard
No my point is that storing in a bloomfilter would be more efficient if you hash the original password with "multiple hash algorithms" rather than hashing a hash value. Sha1 hashes all have a fixed length and hashing them may lead to pretty frequent collisions (this will lead to more false positives). Passwords on the other hand are varied length.
fan
hi, guys. i use std::bitset<> in my project. and i want to the std::bitset<> to a binary string write to a file. but seems the std::bitset<> don't provide similar function to me? can someone know how to solve it?
Khildieharo
hello guys i am new in c++ help me with this
Khildieharo
{
..................
st.push(14);
st.push(2);
st.push (19);
....................
}
in this stack which is first element>
h
Sory.. I dont know about stack..
h
🙈
JustDo
Khildieharo
{
..................
st.push(22);
st.push(2);
st.push (19);
....................
}
question: how many elements in this stack?
klimi
neovstan
Khildieharo
Dima
it is not preferred, try to solve it yourself first
klimi
Yeah, can i? 😂
Well I am not your professor so I am not the one making the rules, you should know that if you can get the answers from others...
Mr
Anonymous
I love C
...
Good Evening mates
...
I need some help, wich program i can run C and edit it on?
...
Yes, I'm newbie here by the way..
Руслан
I have a code that collects data from cells, when you try to turn it in the opposite direction, a division by 0 flies out, although it is not close there
value = kop * power((14 + 6 + 7)) + mod1 * power((6 + 7)) + reg1 * power(7) + dst;
|
\|/
dst = value % power(5);
reg1 = value % power((5 + 7)) / power(5);
mod1 = value % power((6 + 7 + 5)) / power((7 + 5));
kop = value % power((14 + 6 + 7 + 5)) / power((6 + 7 + 5));
Types of data
unsigned long value, value_a, temp;
unsigned char kop, reg1, dst, kop_a, reg1_a, dst_a;
unsigned short mod1, mod1_a;
UPD: power(x) is 2^x
Anonymous
could you guys recommend me websites with cpp exersices?
Khildieharo
Described structure, how to declare a variable of type x of this structure?
struct rectangle{
float length;
float width; };
a. struct rectangle x;
b. struct x rectangle;
c. struct rectangle;
d. struct x;
Doreece
Hi how can I get "indefinite" number of inputs by using only "1"scanf ? Sth like :
Scanf("%d",&…..)
Anupam2.7
int arr[5] = {[0 ... 4] = 1};
This syntax is giving error, why?
something is wrong with my compiler?
klimi
Anupam2.7
Anonymous
Ludovic 'Archivist'
David
Please which compiler are you guys using
Anonymous
Egro
im using vim on linux idk what complier but it run my c++ code
Dm
Anupam2.7
I don't
what does processesSnap() do?
Hi
Hi guys, are you there any recommended ways/ recourses in learning c/c+ ??
cooper
?
Peter
guys, when doing recursion, if you're not careful, you get a segfault
but when using execve, no segfault occurs, it just goes on forever. why?😃
https://pastebin.com/yNz0NBY0
klimi
Руслан
Does anyone know why the code in a loop without storing data has memory? I entered one value - got 0, entered another - got the first
Pavel
neovstan
后藤
Is here anyone using vscode to compile cuda and cpp mix code?
How to compile both .cu and .cpp with task.json?
David
Ludovic 'Archivist'
Please which compiler are you guys using
I mostly use Clang, but I also use GCC, Msvc and NVCC. I teach to people using Msvc and trigger infinite amounts of anger when I show them comparison of error messages between compilers (Msvc is bad at error reporting in C++)
Khildieharo
Can anyone send me c++ tests with answers
olli
Anonymous
I learn c language guide me
klimi
Yeerriinn_
hi, i am currently learning c language. I am doing a program to determine the prime factor of given number. Mine work well for single number, however the project requirement is that, i have to find the prime factor of a given range number.
for example
given a=4 , b=10
prime factor for 4= 2*2
prime factor for 5=5
prime factor for 6=2*3
.
.
.
prime factor for 10=2*5
it will be nice if any of you can help me understand, how do i build the program.
klimi
Yeerriinn_
im not sure cause im really new to this,i just started a month ago, im not sure how to define the f(x) as well
klimi
Yeerriinn_
i do it this way, there will be 2 numbers entered, for a and b, however for the loop, only work for a
For example: a=8, b=10
the output would be
2*2*2*
nothing happpen to b, and also not for the number between 8 to 10
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
unsigned long int a,b,i=2;
printf("Realle Zahlen groesser als 1 mit ',' getrennt Eingeben:\n");
scanf("%lu,%lu",&a,&b);
while(a>=i){
if(a%i==0){
printf("%lu*",i);
a/=i;
}
else
i++;
}
return 0;
}
klimi
well you are taking your input from the user... but you can split this program into more function, create one function that is
void print_factors(unsigned long int x)
which will get that a from main and do the same as this program, then you can extend it to cover a range
Anupam2.7
I want to create a array of int type but it's size in unknown(depends upon user input), then how to declare that array because writing int arr[]; was throwing error of storage size of ‘arr’ isn’t known
alessandro
you need use vector
Anupam2.7
you need use vector
is this a datatype?
isn't there any other way, I just want to input an array.
Egro
its best practice to write , "using namespace std ;" within the function definition. start doing it from now
dont use it as a global variable
Anonymous
welcome to c++ group
Deepak Chaurasia
// Online C compiler to run C program online
#include <stdio.h>
int sn(int o)
{
int s,n;
while (o!=0)
{
// int n;
o%10=s;
n=n+s;
if (o<10)
o/10=o;
if(o<10)
o=0;
}
return n;
}
int main() {
int i,j,k;
printf("Enter Range of no.\n");
scanf("%d%d",&i,&j);
for(int l=i;l<=j;l++)
{
if(sn(l)%3==0)
printf("%d is not prime no.",l);
else
printf("%d is a prime ",l);
}
}
Deepak Chaurasia
Left oprand assign error
Mr
o/10=o;
o%10=s;
I think it have some issue
It should be
o=o/10; or o/=10;
s=o%10;
Yashraj Yadav
Mr
??
I think it will print a list of prime and not prime numbers in a given range