elikor gh
Good eve guys Any help on how to learn C++ on udemy?
Dima
hello
Dima
simply: you don’t
Dima
courses are pretty much worthless
Dima
practice instead
elikor gh
Now want to even start bro Am a total novice
klimi
courses are pretty much worthless
i started doing cs50 xD
klimi
Meaning?
https://cs50.harvard.edu/x/2020/
Dima
i started doing cs50 xD
well this is actually very good
Dima
but when I saw “python”
Dima
got disappointed
klimi
xD
elikor gh
https://cs50.harvard.edu/x/2020/
Is that the link to the book?
Dima
lol
Dima
videos
klimi
Is that the link to the book?
have you actually visited the site?
klimi
lol
i wonder whats the difference between spring/2020 and x
elikor gh
have you actually visited the site?
Am told have to have a github account
elikor gh
I have tried several times creating the account too issues
klimi
hm
Anonymous
well this is actually very good
I want to be a learner tooo
Tokin
hm
You're attitude towards ppl is not good, regardless I like it
elikor gh
The answer to my question is still not provided
elikor gh
I am a novice in c++ and want to start now. What should do
elikor gh
Self help videos or tutorials I want to begin
Tokin
Start with this book
Tokin
C++ Fundamentals (2003)
Tokin
Google.. Plz don't ask for link
elikor gh
Ooh ok
Tokin
C++ Fundamentals (2003)
By Chuck Easttom
elikor gh
elikor gh
I have checked but realised its being sold
elikor gh
Any free version ?
elikor gh
Thanks Tokin
elikor gh
Charley, thanks again with much respect
Tokin
You wanna give me respect.. Complete the book
elikor gh
Awwwww thank you bro I will never disappoint you
binary
hi guys. Please, what's the best way of performing array slicing in c++?
binary
hi guys. Please, what's the best way of performing array slicing in c++?
For example: I have the following: int my_array[8 = {1,0,1,1,0,1} and I want the last four digits in one variable as a binary (or char) in another variable as follows: char new_variable = '1101'
Igor🇺🇦
For example: I have the following: int my_array[8 = {1,0,1,1,0,1} and I want the last four digits in one variable as a binary (or char) in another variable as follows: char new_variable = '1101'
Working with C style arrays requires you to store pointer to the beginning and its size. So you can just pass beginning and size of whatever slice you want to do
infi ptr
For example: I have the following: int my_array[8 = {1,0,1,1,0,1} and I want the last four digits in one variable as a binary (or char) in another variable as follows: char new_variable = '1101'
1. Use convertToString() to make it as string array. 2. Use .substr() to Slice 3. Use stoi() to convert it into interger. 4. Pls let me know if it works
binary
1. Use convertToString() to make it as string array. 2. Use .substr() to Slice 3. Use stoi() to convert it into interger. 4. Pls let me know if it works
Ok. Let me try and see. I am actually working with binary digits and want a way to capture a slice ( with the binary digits) into another variable and then be able to convert it to DEC or any other base I want.
binary
What does it mean "binary digit"? All digits are binary. Do you mean to have it as string?
The int variable array only contains 0 and 1s and I want to slice four digits from that int array into a different variable and have it as follows: char new_var = '01010'
Igor🇺🇦
The int variable array only contains 0 and 1s and I want to slice four digits from that int array into a different variable and have it as follows: char new_var = '01010'
Can you use std::bitset? That container is specifically designed for this kind of operations https://en.cppreference.com/w/cpp/utility/bitset
András
But I may be wrong
Igor🇺🇦
As good as I know, in most cases it's bad idea to use bitset
Why? 🤔 It's just an array with interface for bit operations.
András
Why? 🤔 It's just an array with interface for bit operations.
"One of the biggest problems with bitset and vector<bool> is that their interface design is "too convenient" if you want to use them like an array of booleans. Optimizers are great at obliterating all that structure you establish to provide safety, reduce maintenance cost, make changes less intrusive, etc. They do an especially fine job with selecting instructions and allocating the minimal number of registers to make such code run as fast as the not-so-safe, not-so-easy-to-maintain/change alternatives."
Anonymous
C++ Fundamentals (2003)
Looks like an outdated book
Anonymous
Looks like sharing copyrighted content
Anonymous
Any free version ?
You need to buy content
Anonymous
/warns
Anonymous
/warn sharing copyrighted content
Tokin
Looks like an outdated book
Don't worry about the book being outdated.. Most NEW books don't live upto the mark either..
Sri
Fascinating number programming send me pls
Sri
Wait
Sri
Sri
Fascinating number program
I_Interface
Fascinating number program
and what u want ? solve it instead of u ?
Sri
Yes solve it
Sarathy
I need fascinating number program immediately...
Sarathy
Yeah...