Vlad
Not packing, simd does operations on all of them at once
Vlad
In one case you got 2 and 4 in the other
Vlad
You process 4 at the time not 2
Vlad
low level iq questions I see :P
Hadaward 'Solly'
Hadaward 'Solly'
This is why we cant have more Grace Hoppers. *sigh*
Indolent
you read all the down here
Hadaward 'Solly'
i'm very persistent
Indolent
Kudos sollie
Hadaward 'Solly'
that's how i'm managing through CS course.
Hadaward 'Solly'
danke, freund
Indolent
no shit Sherlock
Anonymous
aymuos
Does virtual and friend function in C++ falls under oops concept ?
aymuos
I mean are those functions a feature of Object oriented programming systems in general?
Hadaward 'Solly'
... well sh*t..
you've been found out
Roxifλsz 🇱🇹
... well sh*t..
Nice bio, weebfren
Noble Friend
Can you use ncurses with c++?
Roxifλsz 🇱🇹
Can you use ncurses with c++?
You can use any C library with C++
Anonymous
Noble Friend
That means so your c++ code would be C
Noble Friend
Dima
You can use any C library with C++
Still better choice than all modern c++ unreadable crap from committee
Pavel
C++ can use any C library (and wrap it into some RAII for example if needed) the same way as Rust can use any C library and wrap into safe functions
Igor🇺🇦
Can you use ncurses with c++?
Here is a small example of C++ using ncurses https://gist.github.com/daleobrien/7535489
Anonymous
I thought only for C
Pavel
I thought only for C
Well, wait.. yes
Pavel
You right, I meant C
Anonymous
If you like feta structures and open source please share my project https://github.com/CoolerVoid/Fortress-of-Solitude
Anonymous
How can I check if user input is double ?
Anonymous
in C
dj
How can I check if user input is double ?
maybe this would help: https://stackoverflow.com/questions/1681873/how-to-make-sure-input-is-a-double-in-the-c-programming-language?rq=1#:~:text=3%20Answers&text=You%20probably%20want%20a%20code,%22%25lf%22%2C%20%26number))%3B
Tohirjon
#include <stdio.h> int main(void) { int i; { printf("How many times did you spend in bathroom: ", i); } if ( i > 0) { printf("12 * i\n"); } else { printf("You write non-positive number;"); } }
Tohirjon
#include <stdio.h> int main(void) { int i; { printf("How many times did you spend in bathroom: ", i); } if ( i > 0) { printf("12 * i\n"); } else { printf("You write non-positive number;"); } }
Can you help me to solve this problem, pls ! I want output, that first asks me How many times did you spend in bathroom : , and i have to write integer, if it is 0 or negative, then output have to write You write non-positive number, if it is >0, then it should multiply to 12. But my output for this code is :How many times did you spend in bathroom: You write non-positive number;
Tintin
scanf is used for taking the value. In here you don't give any value to "i" hence it doesn't invoke the if statement
Tintin
scanf("%d", &i); this would do
Tintin
Anyway I'm a newbie too
Anonymous
#include <stdio.h> int main(void) { int i; { printf("How many times did you spend in bathroom: ", i); } if ( i > 0) { printf("12 * i\n"); } else { printf("You write non-positive number;"); } }
It should be like this : #include <stdio.h> void main(){ int i; printf("How many times did u spend in Bathroom ? : "); scanf("%d",&i); if (i > 0 ){ printf("%d",i*12); } else{ printf("U wrote a Non-positive Number.\nPlease enter a Positive Number."); main(); } }
Anonymous
so, what i have to do now 🤔 after first printf write scanf("%i",i); ?
I highly advice that you should go through the basics of C. U lack that. It's essential to be fluent in basics.
Riya
A user can give a float no. Or an integer as an input so how to take the input ?
Riya
User will give only one float or integer so how do we know ..
Riya
use scanf
In scanf we will be mentioning both but user will input only one number so how
Anonymous
Anonymous
and this quiz also for basic learners, yep ?
yeah, just search C tutorial and go through the basics
Tohirjon
yeah, just search C tutorial and go through the basics
I'm just learning from CS50 Harvard courses
Tohirjon
and it is first question of their lesson
Anonymous
In scanf we will be mentioning both but user will input only one number so how
Example: float x; x=3.14; int y; y= (int)x; printf(“%d”, y); Output: 3
Anonymous
I'm just learning from CS50 Harvard courses
https://www.programiz.com/c-programming U could look at this if u want some basics on C ...
Riya
Any good resources from where to lear c++
Gustavo
Hi! Sorry if my question is silly, but why I can't declare a const size_t value like that? int main() { const size_t n; cin >> n; {
Anonymous
Hi! Sorry if my question is silly, but why I can't declare a const size_t value like that? int main() { const size_t n; cin >> n; {
No 1. You should initialize a const variable 2. You have to include a header that contains a definition for the type because it is not a fundamental type
Priori
Guys could you help me with one thing
Priori
I was writing a simple program to create display insert delete array using clion
Priori
I was able to run the program but not getting the output screen to run the program
Priori
Priori
Please anyone help
Priori
It's only says process finished with exit code
Priori
I am unable to give the input
Priori
Guys anyone knows how to give input
olli
Initialize choice before using it