Mдtt
Yea let's say it's more common in Unix-like file systems
Anonymous
Yea let's say it's more common in Unix-like file systems
It's surprising even android doesn't enable the mitigation
Mдtt
It's surprising even android doesn't enable the mitigation
Mm in android I can't say anything, I'm focusing my studies in Linux
ברני
This is C++, mate.. There's no print statement You mean std::cout
I didnt start c++ yet I'm still on c is it OK to ask the meaning? They are the replace of printf and scanf?
ברני
You want to do C++?
After I'll learn c yes, I want to learn also c#, Java, Python, Html, PHP, and more
Anonymous
no,
cout is different from printf and yet does the same thing, printf is a function while cout is something like a stream
ברני
cout is different from printf and yet does the same thing, printf is a function while cout is something like a stream
Mm I see ty, I'll guess I'll understand better when I'll finish c and start c++.. Even that my friend recomed me to start c# Instade c++ BTW why this group only for c/++ and not for #?
ברני
Oh c# is way different then c/c++?
ברני
I see. Ty for the information 😊
Abhishek
Is there anyone who can help in understanding STL
Anonymous
Hey i m implementing creating stack and implementing operations in stack but my code is rejecting always and idk why ?
Anonymous
Wait i ll send u code .
Anonymous
#include <iostream> using namespace std; int stack[100], n=100, top=-1; void push(int val) { if(top>=n-1) cout<<"Stack Overflow"<<endl; else { top++; stack[top]=val; } } void pop() { if(top<=-1) cout<<"Stack Underflow"<<endl; else { cout<<"The popped element is "<< stack[top] <<endl; top--; } } void display() { if(top>=0) { cout<<"Stack elements are:"; for(int i=top; i>=0; i--) cout<<stack[i]<<" "; cout<<endl; } else cout<<"Stack is empty"; } int main() { int ch, val; cout<<"1) Push in stack"<<endl; cout<<"2) Pop from stack"<<endl; cout<<"3) Display stack"<<endl; cout<<"4) Exit"<<endl; do { cout<<"Enter choice: "<<endl; cin>>ch; switch(ch) { case 1: { cout<<"Enter value to be pushed:"<<endl; cin>>val; push(val); break; } case 2: { pop(); break; } case 3: { display(); break; } case 4: { cout<<"Exit"<<endl; break; } default: { cout<<"Invalid Choice"<<endl; } } }while(ch!=4); return 0; }
Anonymous
Any help
Anonymous
M
Links from stackoverflow might be a good idea
M
I mean allowing them
ברני
Can someone explain me the task with no straight answers please? I didn't understand what they want..
ברני
⦁ Write a function that receives an array of numbers, its size and number. The function will return how many times the number appeared in the array.
Anonymous
Would you like to hear it?
ברני
They want me to make the user to create the array or just do a number game with the numbers in the array?
ברני
Would you like to hear it?
No. I just want to understand the task
Marián
tricky question, can I cin to first number?
Alex
No. I just want to understand the task
create the function with three arguments
Marián
imagine a simple calculator to handle 10+2, 10 + 2 and stuff
Marián
you may do this
ברני
not user, just write the function
And what they want me to do with the numbers to count them? Like how many cells has the number 2 for example?
ברני
yes
OK.. Ty
Marián
imagine a simple calculator to handle 10+2, 10 + 2 and stuff
but what if i needed to read „op“ as a string, for example „sqrt“ and make sure it doesn’t contain any numbers, if it starts some number, it’d automatically pipe into „b“ int… let’s say, for example that both. 4pow3 and 4 pow 3 would be valid
Marián
you may do this
just replace the „op“ with string and make the first number that appears after the operation pipe into b, is that possible
Marián
read everything in one string and then parse it
yeah ikr, getline and parse is my solution but is there way to do this with cin? i don’t say it’s proper way of doing something, just curious what are stream ops capable of
Marián
that doesn’t solve my solution at all? kekw
Alex
maybe its possible, but I feel its not the best option here
Marián
oof
Marián
nvm thanks anyways <33
Георгий
you can use cin as string s; cin » s; :)
for (;;){ cout << "dick"; }
Dima
lol
Dima
retard
Георгий
retard
No, just junior
Vlad
No, just junior
Tardy junior
Vlad
Where yo pappa/big bro then?
Neeraj
Hello Folks PlesSebsuggest me some books or links from where i can learn GUI in C programming. Please mates help me.
Dima
there are a lot of ui libraries for c
Dima
I mean GUI. and its imgui. vulcan (c ui library)
Methodous
hello guys i need a help any one can send me a C++ code for birthday wish
Pooja
I want to know how to write code for second maximum.
Pooja
to find second maximum no.
Pooja
Wants to know code to input no. Thru an array and find out second maximum no.
Merazi
👍
Anonymous
Wants to know code to input no. Thru an array and find out second maximum no.
you can use scanf to get the number from the user and store it in a variable or an array..
Pooja
you can use scanf to get the number from the user and store it in a variable or an array..
Yes.. But I want to know logic how to find second maximum no.
Anonymous
Yes.. But I want to know logic how to find second maximum no.
use else if and compare the elements in the array
Pooja
Can you please help me out with code.
Pooja
C
Anonymous
C
https://codeforwin.org/2015/11/c-program-to-find-second-largest-number-in-array.html#:~:text=Logic%20to%20find%20second%20largest%20element,-Step%20by%20step&text=Declare%20two%20variables%20max1%20and,i%3Csize%3B%20i%2B%2B)%20.
Anonymous
here you go