Valentine
oh shit
Dark
Also the *a
Dark
Yep
Dark
I get that
Dark
You know how to use gdb on Linux?
They is Documentation on it google it
Dark
Here you go, help yourself. gdb documentation
Engineer
They is Documentation on it google it
I know how to use it. It was a question for the gist with segmentation fault.
Dark
Ammar
https://gist.github.com/qubal/c13e76fb356a030702655cd10f299afa Why do i face segmentation fault? indexes are in range of aray sizes
Things that are wrong in your code: 1. Dynamic stack allocation size based on uninitialized variable. int n, number; int a[10]; int b[n]; // notice that n is uninitialized here 2. Sizeof should be used to calculate the size of variable at compile time. In that case sizeof(b) / sizeof(*b) is calculated at compile time, therefore your program may get into a mess since the size of b is not determined properly at compile at. Solution: 1. Put int b[n] after int n has been initialized. Like this: cout << "ENTER N: "; cin >> n; int b[n]; // n is initialized here, so the value can be determined 2. Instead of using sizeof(b) / sizeof(*b), you should be using n, since n itself represents the number of elements in b (the array).
Anonymous
ok
Anonymous
Hii
Anonymous
Hi
Valentine
It’s not a good decision to solve problems five minutes after you wake up Thanks for everyone who helped and tried to help also
Ry13
hi
Anonymous
Oh, I thought the if conditional was checked every single time a thread was scheduled, since it is in the beginning of the while loop. I'll take a better look at multithreading, I've just begun learning it actually, this code is part of an assignment from school. Thanks
Rohan
for(int i = 0; i < size; ++i) if(ar[i] == searched) return i; else return -1; Why it is always returning -1??? Can anyone explain me?
Rohan
Anyone please... help me
Tom
for(int i = 0; i < size; ++i) if(ar[i] == searched) return i; return -1;
Rohan
for(int i = 0; i < size; ++i) if(ar[i] == searched) return i; return -1;
I did this and I'm getting what I want but I want to know why it is not returning i when we include else clause
Tom
it returns -1 when the first one dismatches in your code
Rohan
Why???
Indolent
😂
Rohan
Oh'k.... Any deep reference about it
Tom
Please debug your code step by step, and you'll know why
Rohan
Oh'k....
Rohan
Thank you so much
Indolent
Can Justin Bieber debug a piece of code?
Engineer
Oh'k.... Any deep reference about it
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzarg/logande.htm
Engineer
Oh'k.... Any deep reference about it
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzarg/is.htm
Engineer
Oh'k.... Any deep reference about it
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzarg/rzarg27.htm
Engineer
Hopefully you get the pun you cannot get deeper than deep blue at IBM
Rohan
Thank you Engineer
Don Peter Joseph
https://pastebin.com/A3zpPPgH
Don Peter Joseph
https://pastebin.com/A3zpPPgH
help needed. it is not printing results
Don Peter Joseph
the code was fine until i grouped it into functions
Don Peter Joseph
single linked list
Don Peter Joseph
thanks its working
Rohan
I want to clear after Array: [] not entire screen how I can do this???
Rohan
edit: entire terminal screen
Rohan
edit: not entire terminal screen
Naol
edit the console buffer
Rohan
how???
Rohan
if i use system("cls") it will clear entire terminal...
Anonymous
Hiii
Rohan
Confused, Maybe something else
Rohan
Hiii
bye
Roxifλsz 🇱🇹
Hiii
Nice tits, hoe. Too bad you're probably an indian trying to steal bitcoins
Roxifλsz 🇱🇹
Hiii
/ban
Rohan
yup!!!
Rohan
This particular area
Kaddy
Hey guys, I just joined this group 👋
Alex
Kaddy
/get ide
Kaddy
/get cppbookguide
Anonymous
😕😕😕
Anonymous
Hii guys i need little help I want to start making softwares which I can use both on windows and mobile devices can u suggest how should I start? Pls
Anonymous
Do you know a special programming language?
I know c++, python, Java and web development languages
Anonymous
Anonymous
Anonymous
Ask plz
Anonymous
Ok 😕
Anonymous
Send it there
Anonymous
Use translator
Dima
read the rules
Anonymous
why are there so many newbie questions here like this. im a newbie but i know the fundamentals. my personal reccomendation if youre learning c or c++ buy a book by packt on it. youll get the knowledge to solve simple shit
Anonymous
its alot of work but youll learn
Anonymous
Okey thank you🙂
Anonymous
Your personal reccomedation zidhom fkarak
Anonymous
Hello. Can I ask for suggestion here?
Anonymous
#ot
what does #ot means . I am new on telegram also
V01D
what does #ot means . I am new on telegram also
Off topic, and that is our off topic chat. Here you might risk a warn